Skip to main content

Mindee API helper library for Python

Project description

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!

Off-the-Shelf Documents

World-wide 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/invoice.pdf")
# Parse the document as an invoice by passing the appropriate type
api_response = input_doc.parse(documents.TypeInvoiceV3)

# Print a brief summary of the parsed data
print(api_response.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/check.jpg")
# Parse the document as a USA bank check by passing the appropriate type
api_response = input_doc.parse(documents.us.TypeBankCheckV1)

# Print a brief summary of the parsed data
print(api_response.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.
api_response = mindee_client.doc_from_path(
    "/path/to/the/w9.jpg"
).parse(documents.TypeCustomV1, endpoint_name="wnine")

# Print a brief summary of the parsed data
print(api_response.document)

Further Reading

There's more to it than that for those that need more features, or want to customize the experience.

All the juicy details are described in the Official Guide.

You can also take a look at the Reference Documentation.

License

Copyright © Mindee

Available as open source under the terms of the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mindee-3.0.0.tar.gz (32.7 kB view details)

Uploaded Source

Built Distribution

mindee-3.0.0-py3-none-any.whl (41.3 kB view details)

Uploaded Python 3

File details

Details for the file mindee-3.0.0.tar.gz.

File metadata

  • Download URL: mindee-3.0.0.tar.gz
  • Upload date:
  • Size: 32.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.14

File hashes

Hashes for mindee-3.0.0.tar.gz
Algorithm Hash digest
SHA256 4efc8eca72da42719fe24c0c8425677a160390298284bb25f7805aba354680bf
MD5 79fc25bc74de79f038efdb83436aa222
BLAKE2b-256 fe08dea76ffee1e2ee0d4f34a958699499b2312db5836b1dbd303e1a86ab958d

See more details on using hashes here.

File details

Details for the file mindee-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: mindee-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 41.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.14

File hashes

Hashes for mindee-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7b2b2af48325913c66e192612781962c68105a614e7fd1568e9dd410a4a8927a
MD5 8348403b1d73be7cf7a17f71b8e99f67
BLAKE2b-256 6c0089b1c63f8a38fb5dcf48fef2007e49869b8abb2130daa0a9bbc464a16c08

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page