Registry / finance / drafthorse

drafthorse

JSON →
library2025.2.0pypypiunverified

Python ZUGFeRD XML implementation for creating and parsing ZUGFeRD invoices. Current version 2025.2.0. Released as a date-based version annually with maintenance updates.

finance
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

from drafthorse import Invoice

Create a minimal ZUGFeRD invoice and output XML.

from drafthorse.models.invoice import Invoice from drafthorse.writer import XMLWriter invoice = Invoice() # Set required fields... xml_string = XMLWriter(invoice).write() print(xml_string)
Debug
Known footguns
breakingThe package versioning scheme changed to date-based versions (e.g., 2025.2.0). There is no semantic versioning guarantee.
gotchaAll model fields are mandatory by default. Missing required fields raises a ValueError during write() without clear validation messages.
deprecatedThe old import path 'from drafthorse import Invoice' may still work but is deprecated; use explicit submodule imports.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
25 hits · last 30 days
petalbot
6
gptbot
3
bytedance
2
Resources