pycognaize.document.snapshot.Snapshot
- class Snapshot(path)[source]
Bases:
object
A snapshot of annotated documents from one or more collections
- Parameters:
path (
str
)
Methods
Downloads snapshot to specified destination
Read the snapshot object from local storage and return it
Returns the Snapshot Object
Attributes
Mapping of document ids to documents :return Mapping: LazyDocumentDict Object
- property documents: Mapping
Mapping of document ids to documents :return Mapping: LazyDocumentDict Object
- classmethod download(snapshot_id, destination_dir, exclude_images=False, exclude_ocr=False, exclude_pdf=False, exclude_html=False, require_login=True, snapshot_root=None)[source]
Downloads snapshot to specified destination
- Parameters:
snapshot_id (
str
)destination_dir (
str
)exclude_images (
bool
)exclude_ocr (
bool
)exclude_pdf (
bool
)exclude_html (
bool
)require_login (
bool
)snapshot_root (
str
)
- Return type:
Tuple
[Snapshot
,str
]