exb_sdk.workflow_client.client

Attributes

Classes

Client

A client for getting results of a given document.

Module Contents

exb_sdk.workflow_client.client.Result
class exb_sdk.workflow_client.client.Client[source]

A client for getting results of a given document.

base_url

The base URL of the ExB app.

customer_id

The customer ID of the solution.

solution_id

The solution ID where the workflow exists.

token

The API credential token used for authorization.

dev_mode

When enabled allows to cache file upload and faster result polling. Useful during development when extracting results of the same file multiple times. Do not use when running this in production! Defaults to False.

base_url: str
customer_id: uuid.UUID
solution_id: uuid.UUID
token: str
dev_mode: bool = False
__post_init__()[source]
Return type:

None

async __aenter__()[source]
Return type:

Self

async __aexit__(exc_type, exc, tb)[source]
Parameters:
Return type:

None

async get_result(document_path)[source]

Run an extraction in the ExB for the given document and return its result.

Parameters:

document_path (pathlib.Path) – The path of the document to be uploaded and extracted.

Raises:
Returns:

The result of the extraction as a dictionary.

Return type:

Result