data

emtellisplit_sdk_python.data

Module Contents

Classes

NameDescription
InputDocument
JobStatusRepresents the status of a processing job.
ResultA generic result of processing. Does not say provide information on the success state.
DocumentResultA container for a “document” outputted by emtelliSplit.
EmtellisplitResultA collection of documents outputted by emtelliSplit
CloudResultA handle for interacting with the output of a successful processing job.

API

emtellisplit_sdk_python.data.InputDocument

class emtellisplit_sdk_python.data.InputDocument(cloud_provider, cloud_credential_set, input_object_keys, input_bucket, output_bucket, output_bucket_prefix='', operation='split-ocr-ep', **params)
InputDocument.to_json
to_json()

emtellisplit_sdk_python.data.JobStatus

class emtellisplit_sdk_python.data.JobStatus(status_dict)

Represents the status of a processing job.

JobStatus.is_terminal
is_terminal
JobStatus.is_success
is_success

The only true success is ‘done’

JobStatus.is_failed
is_failed
JobStatus.is_cancelled
is_cancelled
JobStatus.__bool__
__bool__()
JobStatus.to_result_type
to_result_type()

emtellisplit_sdk_python.data.Result

class emtellisplit_sdk_python.data.Result(job_id, job_status: emtellisplit_sdk_python.data.JobStatus, output_bucket_prefix)

A generic result of processing. Does not say provide information on the success state.

emtellisplit_sdk_python.data.DocumentResult

class emtellisplit_sdk_python.data.DocumentResult

A container for a “document” outputted by emtelliSplit.

DocumentResult.emtellipro_category
emtellipro_category: str

Value: None

DocumentResult.emtellipro_subcategory
emtellipro_subcategory: str

Value: None

DocumentResult.content
content: bytes | None

Value: None

DocumentResult.pages
pages: typing.List[bytes] | None

Value: None

DocumentResult.text
text: str | None

Value: None

DocumentResult.subdoc_index
subdoc_index: int | None

Value: None

DocumentResult.page_span
page_span: typing.List[int] | None

Value: None

DocumentResult.emtellipro_metadata
emtellipro_metadata: dict | None

Value: None

DocumentResult.emtellipro_json
emtellipro_json: dict | None

Value: None

DocumentResult.ocr_geometry
ocr_geometry: dict | None

Value: None

emtellisplit_sdk_python.data.EmtellisplitResult

class emtellisplit_sdk_python.data.EmtellisplitResult(job_id, job_status: emtellisplit_sdk_python.data.JobStatus, output_bucket_prefix)

Bases: emtellisplit_sdk_python.data.Result

A collection of documents outputted by emtelliSplit

EmtellisplitResult.docs
docs: typing.List[typing.Optional[str]]

Value: field(...)

EmtellisplitResult.emtellipro_jsonl
emtellipro_jsonl

Returns a list of dicts that is analagous to the JSONL format used by the emtellipro-db-client as input

emtellisplit_sdk_python.data.CloudResult

class emtellisplit_sdk_python.data.CloudResult(job_id, job_status=None, output_bucket_prefix='')

A handle for interacting with the output of a successful processing job.

Since the files are located in your (i.e. customer) remote cloud storage, this is an object that can be interacted with using your cloud credential set to get the results for that job into memory.

The credentials are required to grant list and read access.

CloudResult.get_result
get_result(
cloud_provider,
bucket,
cloud_credential_set
) -> emtellisplit_sdk_python.data.EmtellisplitResult

Returns an object representing all the meaningful outputs of a job. If this is called on a partially failed job, not all expected data will exist. If this is called on a job which has not finished, not all expected data will exist. Warning: this result object may be extremely large