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 mindee
Finally, Python away!
Loading a File and Parsing It
Global Documents
from mindee import Client, documents
# Init a new client
mindee_client = Client(api_key="my-api-key")
# Load a file from disk
input_doc = mindee_client.doc_from_path("/path/to/the/file.ext")
# Parse the document as an invoice by passing the appropriate type
result = input_doc.parse(documents.TypeInvoiceV4)
# Print a brief summary of the parsed data
print(result.document)
Region-Specific Documents
from mindee import Client, documents
# Init a new client
mindee_client = Client(api_key="my-api-key")
# Load a file from disk
input_doc = mindee_client.doc_from_path("/path/to/the/file.ext")
# Parse the document as a USA bank check by passing the appropriate type
result = input_doc.parse(documents.us.TypeBankCheckV1)
# Print a brief summary of the parsed data
print(result.document)
Custom Document (API Builder)
from mindee import Client, documents
# Init a new client and add your custom endpoint (document)
mindee_client = Client(api_key="my-api-key").add_endpoint(
account_name="john",
endpoint_name="wnine",
)
# Load a file from disk and parse it.
# The endpoint name must be specified since it can't be determined from the class.
result = mindee_client.doc_from_path(
"/path/to/the/file.ext"
).parse(documents.TypeCustomV1, endpoint_name="wnine")
# Print a brief summary of the parsed data
print(result.document)
# Iterate over all the fields in the document
for field_name, field_values in result.document.fields.items():
print(field_name, "=", field_values)
Further Reading
Complete details on the working of the library are available in the following guides:
- Getting started
- Command Line Interface (CLI)
- Custom APIs (API Builder)
- Invoice API
- Passport API
- Receipt API
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.
Questions?
Metadata
Release files for mindee 3.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mindee-3.8.0.tar.gz | 55.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mindee-3.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 123.6 kB
Release files / mindee-3.8.0.tar.gz
| Download URL | mindee-3.8.0.tar.gz |
|---|---|
| Size | 55.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c52f49e2087de2472e3489e46c92140bf41092b096305326a691bd1b8eb1cb7
|
|
BLAKE2b-256 checksum How to use checksums |
eb1e88d0066c6dff67775d6ac510dab5284215d8cb46b1558885df3f4addfdbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / mindee-3.8.0-py3-none-any.whl
| Download URL | mindee-3.8.0-py3-none-any.whl |
|---|---|
| Size | 67.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
772c78b8fa35545ee74bf14a508c7d9a1ba33524c6cd99f745ac06af932cd46b
|
|
BLAKE2b-256 checksum How to use checksums |
cab3a3de47c6ec86a5b34c120c9b57586abbc2531ffb79b24494c7a93e23a10b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|