annotron — Python SDK
Official Python client for the Annotron API — French document parsing (Factur-X, KBis, RIB, paie, CERFA) returning typed, validated fields.
pip install annotron
Quickstart
from annotron import Annotron
client = Annotron(api_key="sk_live_...")
result = client.parse("facture.pdf")
print(result.siret) # "12345678900012" (Luhn-valide)
print(result.iban) # "FR12 3456 7890…" (mod-97-valide)
print(result.total_ttc) # "1 234,56 €"
print(result.invoice_date) # "12/03/2026"
print(result.dirigeants) # ["Jean MARTIN", "Marie DURAND"]
For everything not exposed as a property, use result.items:
for it in result.items:
print(it.type, it.content, it.confidence)
Configuration
The client reads from two environment variables if not passed explicitly:
export ANNOTRON_API_KEY=sk_live_...
export ANNOTRON_BASE_URL=https://api.annotron.com # or your self-host
Self-hosting
On the Team plan you can run the worker yourself. Point the SDK at your endpoint:
client = Annotron(api_key="...", base_url="https://annotron.intra.acme.com")
Errors
from annotron import Annotron, AnnotronError
try:
r = client.parse("malformed.pdf")
except AnnotronError as e:
print(f"HTTP {e.status_code}: {e}")
Roadmap
- Synchronous client
- Async client (
AnnotronAsync— issue welcome) - Batch endpoint (
client.parse_batch(files)) - Webhook signature verification helpers
PRs welcome. Apache-2.0.
Metadata
Release files for annotron 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| annotron-0.1.1.tar.gz | 5.7 kB | Without provenance | Details for annotron-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| annotron-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for annotron-0.1.1-py3-none-any.whl |
Total release size: 12.1 kB
Release files / annotron-0.1.1.tar.gz
| Download URL | annotron-0.1.1.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b9241167be9ba7c293d9d3088351e87bf7b8d5856ff221c3697fb021db1a8b7
|
|
BLAKE2b-256 checksum How to use checksums |
a5f74eb244c1505567848235b8ea1599e8dfbe48483cec1ca82b4cc2a5faa661
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Release files / annotron-0.1.1-py3-none-any.whl
| Download URL | annotron-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
216b7092932bebba270291a7f8b220ace57365d74624d962d94debb54a29370d
|
|
BLAKE2b-256 checksum How to use checksums |
a13c9f8999833e6ba449b8f8ec9d827787118fd209786bf3e4f2f26899b6881c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Security for annotron 0.1.1
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.