Annotron — French document parsing (Factur-X, KBis, RIB, paie, CERFA). Official Python SDK.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file annotron-0.1.0.tar.gz.
File metadata
- Download URL: annotron-0.1.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40be44384b11dbcc59bba1a0e1f6ee9a02ed43e92be8662ceb1ece0cb496bbb5
|
|
| MD5 |
462ca32569963de3401c1347214e20cf
|
|
| BLAKE2b-256 |
9bcc8f2cc77d97b4502cb894338b50de313189313f06d772ba20ef9006da341d
|
File details
Details for the file annotron-0.1.0-py3-none-any.whl.
File metadata
- Download URL: annotron-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91b66f5624ced1132aba21d3335d3f305ebf9042fefc93e503740887bdd59260
|
|
| MD5 |
bf66787eb2272a7bd4f7f84427898943
|
|
| BLAKE2b-256 |
74db12f6e0b31ef2540de859b29af16862c181b36da39b6b7b99e6c873febe5e
|