Skip to main content

Acodis API Handler

This package provides easy to use python classes and functions to communicate with Acodis API (https://acodis.io). Acodis is an IDP solution that focuses on extracting and structuring complex documents (PDFs, Images)

Installation

pip install AcodisApiHandler

Usage

This package is particularly useful for programmatic access, since ACODIS' API structure requires a different user and password for every export step. Hence, if you have to manage multiple exports (e.g. multiple workflows), you just need to update the main class user and password attribute, and call the authenticate() method.

from AcodisApiHandler import AcodisApiHandler

# Set up your credentials
ACODIS_BASE_URL = "https://<YOUR-ACOIDS-INSTANCE-URL>/workbench/api/transaction"
ACODIS_USER = "<YOUR-EXPORT-USERNAME>"
ACODIS_PASSWORD = "<YOUR-EXPORT-PASSWORD>"

# Create an instance of the AcodisApiHandler class
handler = AcodisApiHandler(ACODIS_BASE_URL)

# Set the credentials
handler.user = ACODIS_USER
handler.password = ACODIS_PASSWORD

# Authenticate with the API
handler.authenticate()

handler.workflow(pdf_path="<PATH-TO-PDF-FILE>")

# The extraction result is an ElementTree XML object stored in the handler.result variable
# You can check it by:
print(handler.result)

Utils

This package also provides some utils to help you with the extraction process.

Extracting tagged data points

Tags are used to identify the data points that you want to extract from the document. This function will create a dictionary with the tags as keys and the extracted data as values.

from AcodisApiHandler import extract_tags

tags_list = ["example_tag_1", "example_tag_1", "example_tag_1"]

# Using the precviously created handler instance
tagged_data = extract_tags(handler, tags_list)

If we print the tagged_data variable we will get:

{
    "example_tag_1": "Example data 1",
    "example_tag_2": "Example data 2",
    "example_tag_3": "Example data 3"
}

License

MIT

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Roadmap

  • Additional utils: parsing tables, extracting images, etc.
  • Add unit tests
  • Add batch processing and parallelization

Metadata

Release files for AcodisApiHandler 0.3.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for AcodisApiHandler 0.3.7
File Size Uploaded Provenance
AcodisApiHandler-0.3.7.tar.gz 9.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for AcodisApiHandler 0.3.7
File Interpreter ABI Platform
AcodisApiHandler-0.3.7-py3-none-any.whl Python 3 none any Details

Total release size: 18.5 kB

Release files / AcodisApiHandler-0.3.7.tar.gz

Download URL AcodisApiHandler-0.3.7.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f2fea8bbbc7ffdabc7d73994c35bc43788e4491efff59ce060778097f992b95f
BLAKE2b-256 checksum
How to use checksums
88f4c22f321e5bbe455aa3a95b41cdabb91d25164ed44318fc13e5d6ec71d9fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / AcodisApiHandler-0.3.7-py3-none-any.whl

Download URL AcodisApiHandler-0.3.7-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aff4246b8ebd7217c041027c0b4350fdcba040b1715232e5d6a78c2cb48001b6
BLAKE2b-256 checksum
How to use checksums
09722f2840bf8274895a48b149859e68378dfc4da7521fc61220ba3bfeedebd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.9.18

Security for AcodisApiHandler 0.3.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page