Parses a list of Blob lazily.
batch_parse(
self,
blobs: Sequence[Blob],
gcs_output_path: Optional[str] = None,
timeout_sec: int = 3600,
check_in_interval_sec: int = 60,
**process_options_kwargs: Any = {}
) -> Iterator[Document]# Submit async jobs
operations = parser.docai_parse(blobs, gcs_path)
# Optionally poll until finished
parser.is_running(operations)
# Save operation names
operation_names = [op.operation.name for op in operations]
# Later, load results and build Documents
operations = parser.operations_from_names(operation_names)
results = parser.get_results(operations)
docs = parser.parse_from_results(results)| Name | Type | Description |
|---|---|---|
blobs* | Sequence[Blob] | A list of |
gcs_output_path | Optional[str] | Default: NonePath on Google Cloud Storage to store parsing results. |
timeout_sec | int | Default: 3600Timeout to wait for Document AI to complete, in seconds. |
check_in_interval_sec | int | Default: 60Interval to wait until next check whether parsing operations have been completed, in seconds. |
process_options_kwargs | Any | Default: {}Optional parameters to pass to the Document AI processors |