Skip to main content

The official Python library for the automaited API

Project description

automaited Python API library

The automaited Python library provides convenient access to the automaited REST API from any Python 3.10+ application. The library includes type definitions for all request params and response fields, and offers both synchronous and asynchronous clients powered by httpx.

Installation

[!IMPORTANT] The document extraction service is currently in a closed beta.

# install from PyPI
pip install automaited

Usage

Define the target model you want to populate and pass it with the PDF that you want to process into the .extract_model() method. Here is an example:

from datetime import date
from pydantic import Field, BaseModel
from automaited import DocExtClient
# from automaited import AsyncDocExtClient

class Article(BaseModel):
    article_number: str = Field(..., description="Typically alphabetical or alphanumerical.")
    description: str = Field(..., description="Description of the item.")
    quantity: float = Field(..., description="Number of pieces.")

class PurchaseOrder(BaseModel):
    customer_name: str = Field(..., description="Examples: Kaladent Inc., Henkel GmbH")
    order_number: str = Field(..., description="The purchase order number.")
    order_date: date = Field(..., description="The purchase order date.")
    items: list[Article] = Field(default_factory=list, description="List of all ordered articles.")

client = DocExtClient(API_KEY="TEST_BETA:you@company.com") # Replace the email with yours. As soon as we are out of beta you will receive a proper API key for production.
result: PurchaseOrder = client.extract_model(PurchaseOrder, "./po.pdf") # automaited.dev/samples
print(result)

You can download a sample PDF here: automaited.dev/samples If you want to learn more about how to define target models, just take a look at the pydantic docs

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

automaited-0.1.3.tar.gz (201.1 kB view details)

Uploaded Source

Built Distribution

automaited-0.1.3-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file automaited-0.1.3.tar.gz.

File metadata

  • Download URL: automaited-0.1.3.tar.gz
  • Upload date:
  • Size: 201.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.25

File hashes

Hashes for automaited-0.1.3.tar.gz
Algorithm Hash digest
SHA256 83de60e6009889fa0cc668d02478608f2af3bc73b6e2d71073c493e6e7dcaec3
MD5 6854626361a72469ddf21cd4d7fc7dcc
BLAKE2b-256 451c2d879384dc364db83f494b1c77d906978648a5e2fa7089ec183955e84d24

See more details on using hashes here.

File details

Details for the file automaited-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for automaited-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 85515ad8887d3a5f61f9c501a2d04b2b4ecb15b6480b63e4e3d1c5542c386d4b
MD5 21343b6fd1cb8b9c0c9aee4fb97a5b19
BLAKE2b-256 ee1d87dbaa10983157c3efe6d9e5ef0c6147527971627abb2e298524668c8c5a

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