googleapis / python-documentai-toolbox

Document AI Toolbox is an SDK for Python that provides utility functions for managing, manipulating, and extracting information from the document response. It creates a "wrapped" document object from JSON files in Cloud Storage, local JSON files, or output directly from the Document AI API.
https://cloud.google.com/document-ai/docs/toolbox
Apache License 2.0
32 stars 13 forks source link

Allow Importing Multiple Documents from a single GCS Path #214

Open holtskinner opened 9 months ago

holtskinner commented 9 months ago

Inspired by https://stackoverflow.com/a/77609221/6216983

Thefrom_gcs() method can only create a single Wrapped Document from a single document output in GCS.

It could be simpler for users if this method could output a list of Wrapped Documents from a GCS path similar to from_batch_process_operation() and from_batch_process_metadata().

However, this would be backwards incompatible, so an alternative is to create a new method for this functionality. (Not sure what the best name would be)