exb_sdk.workflow_client.client¶
Attributes¶
Classes¶
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.
- async __aexit__(exc_type, exc, tb)[source]¶
- Parameters:
exc_type (type[BaseException] | None)
exc (BaseException | None)
tb (types.TracebackType | None)
- 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:
WaitForResultCancelledError – if the client gets closed while waiting for a result.
DocumentProcessingError – if the extraction failed.
HttpError – if any operation to upload or getting the result fails with an unexpected error.
- Returns:
The result of the extraction as a dictionary.
- Return type:
Result