DocStore
docarray.store.abstract_doc_store.AbstractDocStore
Bases: ABC
Source code in docarray/store/abstract_doc_store.py
delete(name, missing_ok)
abstractmethod
staticmethod
Delete the DocList object at the specified name
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name of the DocList to delete |
required |
missing_ok |
bool
|
If true, no error will be raised if the DocList does not exist. |
required |
Returns:
Type | Description |
---|---|
bool
|
True if the DocList was deleted, False if it did not exist. |
Source code in docarray/store/abstract_doc_store.py
list(namespace, show_table)
abstractmethod
staticmethod
List all DocLists in the specified backend at the namespace.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
namespace |
str
|
The namespace to list |
required |
show_table |
bool
|
If true, a table is printed to the console |
required |
Returns:
Type | Description |
---|---|
List[str]
|
A list of DocList names |
Source code in docarray/store/abstract_doc_store.py
pull(docs_cls, name, show_progress, local_cache)
abstractmethod
staticmethod
Pull a DocList from the specified name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
docs_cls |
Type[DocList]
|
The DocList class to instantiate |
required |
name |
str
|
The name to pull from |
required |
show_progress |
bool
|
If true, a progress bar will be displayed. |
required |
local_cache |
bool
|
If true, the DocList will be cached locally |
required |
Returns:
Type | Description |
---|---|
DocList
|
A DocList |
Source code in docarray/store/abstract_doc_store.py
pull_stream(docs_cls, name, show_progress, local_cache)
abstractmethod
staticmethod
Pull a stream of documents from the specified name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
docs_cls |
Type[DocList]
|
The DocList class to instantiate |
required |
name |
str
|
The name to pull from |
required |
show_progress |
bool
|
If true, a progress bar will be displayed. |
required |
local_cache |
bool
|
If true, the DocList will be cached locally |
required |
Returns:
Type | Description |
---|---|
Iterator[BaseDoc]
|
An iterator of documents |
Source code in docarray/store/abstract_doc_store.py
push(docs, name, show_progress)
abstractmethod
staticmethod
Push this DocList to the specified name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
docs |
DocList
|
The DocList to push |
required |
name |
str
|
The name to push to |
required |
show_progress |
bool
|
If true, a progress bar will be displayed. |
required |
Source code in docarray/store/abstract_doc_store.py
push_stream(docs, url, show_progress=False)
abstractmethod
staticmethod
Push a stream of documents to the specified name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
docs |
Iterator[BaseDoc]
|
a stream of documents |
required |
url |
str
|
The name to push to |
required |
show_progress |
bool
|
If true, a progress bar will be displayed. |
False
|