Skip to content

anafpy 0.1.0

Choose a tag to compare

@robert-malai robert-malai released this 07 Jul 07:50

First public release, on PyPI as anafpy.

bash pip install anafpy # typed async clients pip install 'anafpy[mcp]' # + the MCP server ​

What's in the box

  • Typed async clients (httpx + Pydantic v2) for Romania's ANAF web services:
    • e-Factura — upload (XML pass-through), status, paginated message lists, download with a flat read view of received UBL invoices (FlatInvoice)
    • e-Transport — fully translated bidirectional flat models for all four operations (declaration/correction, deletion, confirmation, vehicle change): author a filing or read a parsed one with the same models
    • Public no-auth services — registry lookups (VAT, e-Factura, RO e-TVA, agriculture, culture), financial statements, and the stateless validare/transformare document services
  • OAuth2 auth layer for ANAF's qualified-certificate flow: interactive anafpy auth login (browser + certificate, one-time), headless refresh afterwards; tokens live in the OS credential store by default (keyring), with a file backend for headless hosts
  • MCP server (anafpy[mcp], stdio) exposing the operations as tools for Claude Desktop / Claude Code / Cowork — read-only e-Factura inbox with PDF/ZIP export to disk, two-step confirmed e-Transport filing, public lookups, plus the compiled ANAF API reference as resources and workflow skills as prompts
  • Docs: README for developers, INSTALL as an end-to-end non-developer walkthrough, DESIGN for the rationale

Python 3.12+. License Apache-2.0. Free and as-is; the MCP server is best-effort — see the README for the support stance.

Note for MCP users: run the server from a repo checkout (per INSTALL.md) — the ANAF reference resources and workflow-skill prompts ship with the repo, not the wheel.