Python OCR SDK
Mindee API Helper Library for Python
Quickly and easily connect to Mindee's API services using Python.
Quick Start
Here's the TL;DR of getting started.
First, get an API Key
Then, install this library:
pip install mindeeFinally, Python away!
Loading a File and Parsing It
Global Documents
from mindee import Client, product
# Init a new client
mindee_client = Client(api_key="my-api-key")
# Load a file from disk
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
# Parse the document as an invoice by passing the appropriate type
result = mindee_client.parse(product.InvoiceV4, input_doc)
# Print a brief summary of the parsed data
print(result.document)Note: Files can also be loaded from:
A python BinaryIO compatible file:
A URL (HTTPS only):
A base64-encoded string, making sure to specify the extension of the file name:
Raw bytes, making sure to specify the extension of the file name:
Region-Specific Documents
Custom Document (API Builder)
Additional Options
Options to pass when sending a file.
Page Options
Allows sending only certain pages in a PDF.
In this example we only send the first, penultimate and last pages:
Further Reading
You can view the source code on GitHub.
You can also take a look at the Reference Documentation.
License
Copyright © Mindee
Available as open source under the terms of the MIT License.
Last updated
Was this helpful?

