Skip to main content

django-xrechnung

PyPI version PyPI - Python Version PyPI - Django Versions from Framework Classifiers PyPI - License Latest on Django Packages

Create validated XRechnung XML and printable PDF invoices in Django.

Bring invoicing into your existing Django project: prepare drafts in admin or Python, review calculated totals, then finalize and download both documents. The app runs the official KoSIT validator locally and renders PDFs with WeasyPrint. XML, PDF, and the validation report are stored together when finalization succeeds.

What it does

  • Invoices, credit notes, and corrections: generate XRechnung 3.0.2 documents in UBL 2.1 or CII, including credit notes and corrected invoices linked to their originals.
  • Flexible VAT: combine German 7% and 19% VAT, exempt lines, and reverse charge with separate tax breakdowns, exemption reasons, and consistent decimal rounding.
  • Printable PDFs: produce German invoice layouts with customizable templates, wrapping descriptions, repeated table headers, and page numbers.
  • Factur-X output: generate PDF/A-3b invoices with embedded CII using WeasyPrint, validated by veraPDF and the pinned XML rules before issuance.
  • Less repeated data entry: reuse seller, contact, and payment defaults for new drafts without changing existing invoices.
  • Controlled issuance: enforce ownership and Django permissions, validate before issuing, and preserve finalized documents against edits through the app.
  • Django integration: use the supplied admin, review pages, JSON read endpoints, document downloads, and Python services in your own workflows.
  • Incoming invoice review: receive immutable originals through Python, a management command, or admin upload; deduplicate within owned inboxes, retain validation evidence, and retry failures. Validate UBL/CII XRechnung and Factur-X XML, including XML extracted from PDFs with the optional inbound extra. Review parsed parties, lines and totals, reconciliation mismatches, and unsupported fields without changing originals.

Invoice validation and PDF rendering run on your application host. Invoice data is not uploaded to an external validation service.

Project status

Alpha, under active development. The draft-to-document workflow is implemented, including credit notes and corrections. Automated tests exercise real KoSIT acceptance and rejection, PDF output, permissions, calculations, migrations, and installation from a built wheel.

The current outgoing invoice scope covers German sellers and buyers, EUR, standard VAT, exemptions and reverse charge, email electronic addresses, and SEPA transfers to German IBANs. See the supported invoice scenarios for exact limits.

Creating invoices with discounts, charges, attachments, or additional countries, and transmission integrations, are not yet supported. Settlement tracking and cumulative credit limits remain outside the app. PDFs can be separate printable documents or Factur-X EN 16931 hybrids with embedded CII and mandatory runtime PDF/A-3b checks.

Get started

Install from Codeberg with Git available in your environment:

python -m pip install git+https://codeberg.org/fsbraun/django-xrechnung.git

Follow the first-invoice tutorial to install into a Django project and generate your first XML and PDF. The installation guide covers Java and WeasyPrint's system dependencies.

Documentation

The documentation is organized around tutorials, how-to guides, reference, and explanation:

For repository development, see contributing.

See the runnable example, changelog, and compatibility and release policy.

License

BSD 3-Clause. KoSIT, WeasyPrint, and system fonts retain their upstream licenses.

Metadata

Release files for django-xrechnung 0.2.0

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

Source distribution (sdist)

Source distribution for django-xrechnung 0.2.0
File Size Uploaded Provenance Actions
django_xrechnung-0.2.0.tar.gz 250.5 kB Without provenance Details for django_xrechnung-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-xrechnung 0.2.0
File Interpreter ABI Platform Actions
django_xrechnung-0.2.0-py3-none-any.whl Python 3 none any Details for django_xrechnung-0.2.0-py3-none-any.whl

Total release size: 381.2 kB

Release files / django_xrechnung-0.2.0.tar.gz

Download URL django_xrechnung-0.2.0.tar.gz
Size 250.5 kB
Tags Source
SHA-256 checksum
How to use checksums
81830b34b53a8670be3f2e60bbf39e0aad95bf6e448b2da93049c62f00e5eb26
BLAKE2b-256 checksum
How to use checksums
dfd356f4146de76c66772f10193fc1baf29963619063ec78689efd66c6883a73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / django_xrechnung-0.2.0-py3-none-any.whl

Download URL django_xrechnung-0.2.0-py3-none-any.whl
Size 130.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f06739552f062e845befa057e266db5a3032a0b1d489f33bed6f5e67ba123f1
BLAKE2b-256 checksum
How to use checksums
86ca937fa992759d8faff4be7df67c705022f60bbddb0ffcf75dafead9b3f9d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Security for django-xrechnung 0.2.0

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