This page was recently updated. What do you think about it? Let us know!.

Connect local files to your preprocessing pipeline, and use the Unstructured Ingest CLI or the Unstructured Ingest Python library to batch process all your documents and store structured outputs locally on your filesystem.

You will need the local source connector dependencies:

CLI, Python
pip install unstructured-ingest

To use the local source connector, you must set --input-path (CLI) or input_path (Python) to the path in the local filesystem which contains documents you wish to process. Optionally, you can limit processing to certain file types by setting --file-glob (CLI) or file_glob (Python), for example to .docx to process only .docx files.

These environment variables:

  • UNSTRUCTURED_API_KEY - Your Unstructured API key value.
  • UNSTRUCTURED_API_URL - Your Unstructured API URL.

Now call the Unstructured Ingest CLI or the Unstructured Ingest Python library. The destination connector can be any of the ones supported.

The following 3-minute video shows how to use the Unstructured Ingest Python library to send multiple PDFs from a local directory in batches to be ingested by Unstructured API services for processing:

This example uses the local destination connector: