Skip to main content

Nanonets API SDK for Python

Project description

nanonetsclient

Python SDK for the Nanonets API

Minimum Python version required: 3.7


Nanonets is an AI-powered Intelligent Document Processing platform that helps you:

  • Extract structured data from invoices, receipts, forms, and more documents
  • Supports pdf, images (jpg, png, tiff), excel files, scanned documents and photos
  • Automate data entry and document workflows
  • Convert unstructured documents into machine-readable formats
  • Integrate advanced OCR and table extraction into your apps

Keywords: OCR, document extraction, invoice processing, receipt OCR, table extraction, data capture, workflow automation, AI document processing, unstructured to structured data, Python SDK, Nanonets API


Get your API Key

Sign up and get your API key from your Nanonets dashboard.


Installation

pip install nanonetsclient

Authentication

Set your API key as an environment variable:

export NANONETS_API_KEY='your_api_key'

Or pass it directly when initializing the client:

from nanonets import NanonetsClient
client = NanonetsClient(api_key='your_api_key')

Quick Start

from nanonets import NanonetsClient

client = NanonetsClient(api_key='your_api_key')

# 1. Create a workflow
workflow = client.workflows.create(
    description="SDK Example Workflow",
    workflow_type=""  # Instant learning
)
workflow_id = workflow.get("workflow_id") or workflow.get("id")

# 2. Configure fields and table headers
fields = [
    {"name": "invoice_number"},
    {"name": "total_amount"},
    {"name": "invoice_date"}
]
table_headers = [
    {"name": "item_description"},
    {"name": "quantity"},
    {"name": "unit_price"},
    {"name": "total"}
]
client.workflows.set_fields(
    workflow_id=workflow_id,
    fields=fields,
    table_headers=table_headers
)

# 3. Upload a document to process
result = client.workflows.upload_document(
    workflow_id=workflow_id,
    file_path="invoice.pdf",
    async_mode=False,
    metadata={"test": "true"}
)
print("Upload result:", result)

Features

  • Workflow Management
  • Fields and Tables Configuration
  • Document Processing
  • Document Moderation

Available Methods

Workflow Management

  • create_workflow
  • get_workflow
  • list_workflows
  • set_fields
  • update_field
  • delete_field
  • update_metadata
  • update_settings

Document Processing

  • upload_document
  • get_document
  • list_documents
  • delete_document

Document Moderation

  • update_field_value
  • add_field_value
  • delete_field_value
  • add_table
  • delete_table
  • update_table_cell
  • add_table_cell
  • delete_table_cell
  • verify_field
  • verify_table_cell
  • verify_table
  • verify_document

Complete Documentation

For full documentation and advanced usage, visit:
https://apidocs.nanonets.com/docs/sdk/python-sdk/

License

MIT

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

nanonetsclient-1.0.3.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nanonetsclient-1.0.3-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file nanonetsclient-1.0.3.tar.gz.

File metadata

  • Download URL: nanonetsclient-1.0.3.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.9

File hashes

Hashes for nanonetsclient-1.0.3.tar.gz
Algorithm Hash digest
SHA256 03733a9e19bd253cc8976b6eb51aa6b1f03dd11b0d747fa75b22debcfa5c64f5
MD5 9819aef43f14f85e3659877471bbddb7
BLAKE2b-256 de9e495b14494b2d856f6e035c9fd394eb72515484992e90b4ec6a25dca72216

See more details on using hashes here.

File details

Details for the file nanonetsclient-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: nanonetsclient-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.9

File hashes

Hashes for nanonetsclient-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a338c83cc9f8017f49ef7d856ad91b3a82231f32c6d28b51202c4e8f88ab1965
MD5 3aa39c006627f8793c80d3f7e10cd86a
BLAKE2b-256 43cfa160649317e60b777ccbc2c46c3abf3c60baa138b4ec4b334d8311b8eaa5

See more details on using hashes here.

Supported by

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