factur-x
Factur-X and Order-X: electronic invoicing and ordering standards
What it is and what it does
Factur-X is a Python library for working with electronic invoicing standards used in Europe, particularly Factur-X (France/Germany), Order-X (purchase orders), and UBL (Universal Business Language). It embeds structured XML invoice data into PDF files to create compliant e-invoices that meet the EN 16931 European standard. The library can generate e-invoices from a regular PDF and XML file, extract embedded XML from existing e-invoice PDFs, validate XML against official schemas and schematrons, and generate CII or UBL XML from Python dictionaries using standard EN-16931 tag keys.
The package includes command-line tools (facturx-pdfgen, facturx-pdfextractxml, facturx-xmlcheck) for common operations and an optional Flask-based webservice for remote PDF generation. It depends on lxml for XML processing, pypdf for PDF manipulation, requests for HTTP operations, python-stdnum for number validation, and importlib-resources for resource management. The library is actively maintained, supports current Python versions, and has no known security vulnerabilities.
Use it for:
- Generate compliant Factur-X invoices from existing PDF invoices and XML metadata for German/French e-invoicing requirements
- Extract and validate embedded XML from received e-invoice PDFs to verify compliance with EN 16931 standards
- Create Order-X purchase order documents with embedded XML for electronic procurement workflows
- Validate Factur-X, Order-X, or UBL XML files against official schemas and schematron rules before submission
- Build a webservice or batch system to convert regular PDF invoices to e-invoices with embedded structured data
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Generates, validates, and extracts Factur-X, Order-X, and UBL electronic invoicing XML from PDF documents, supporting European e-invoicing standards EN 16931 and ZUGFeRD.
Yes. The package is actively maintained, has low install friction, no known vulnerabilities, and a permissive BSD license. Install it if you need to generate, validate, or extract European e-invoicing standards (Factur-X, Order-X, UBL) or integrate EN 16931 compliance into invoice workflows. It is production-stable and suitable for both command-line and programmatic use.
Install
factur-x on PyPI
pip
pip install factur-xuv
uv add factur-xpoetry
poetry add factur-xInstalling factur-x
Before you install
Low install friction with five common runtime dependencies (lxml, pypdf, requests, python-stdnum, importlib-resources). Actively maintained with a release dated 2026-08-08, 303 GitHub stars, and no known vulnerabilities.
License in practice
Published under the BSD License (permissive), the same license as pypdf on which it depends. No restrictions on commercial or proprietary use.
Quickstart
pip install factur-x
from facturx import generate_from_file
generate_from_file('invoice.pdf', 'factur-x.xml', 'output.pdf')
Requires Python 3.8 or later; lxml has compiled dependencies that may require build tools on some systems.
Verify before relying
- Whether the package handles all Factur-X profile variants (Basic, EN16931, Extended) or only a subset
- Performance characteristics when processing large PDF files or batch operations
- Whether the webservice component is production-ready or requires external deployment infrastructure
Package facts
| License | Copyright (c) 2016-2023, Alexis de Lattre <alexis.delattre@akretion.com> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — importlib-resources, lxml, pypdf, python-stdnum, requests |
| Maintenance | actively maintained — 6 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 318,194/month — #7,655 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: factur_x-6.7-py3-none-any.whl
Keywords: Factur-X, Order-X, ZUGFeRD, e-invoice, e-procurement
Tags
More Accounting packages
Generates country- and subdivision-specific…
permissive · top 1,000 on PyPI
numpy-financialProvides elementary financial functions (IRR,…
permissive · top 5,000 on PyPI
fiscalyearProvides fiscal year, quarter, month, and day…
permissive · top 15,000 on PyPI
pyxeroPyXero is a Python client library for the Xero…
permissive · top 15,000 on PyPI
taxjarPython client library for the TaxJar Sales Tax…
permissive · top 15,000 on PyPI
ofxtoolsParses, generates, and converts Open Financial…
copyleft · top 15,000 on PyPI
drafthorseGenerates and parses ZUGFeRD XML invoice…
permissive · top 15,000 on PyPI
BrazilFiscalReportConverts Brazilian electronic invoice XML files…
agpl · top 15,000 on PyPI
saxoncheSaxonC-HE is a Python wrapper for Saxon, an XML…
unclear · top 5,000 on PyPI
kreuzbergExtracts text, tables, images, and metadata…
permissive · top 15,000 on PyPI
doclangDocLang is a reference toolkit for validating…
permissive · top 5,000 on PyPI
endesiveEndesive signs and verifies digital signatures…
unclear · top 15,000 on PyPI
docxCreates, reads, and writes Microsoft Office…
unclear · top 15,000 on PyPI
peakrdl-ipxactConverts between SystemRDL register…
copyleft · top 15,000 on PyPI
pdfminerExtracts text and layout information from PDF…
permissive · top 15,000 on PyPI
textractExtracts text from documents in multiple…
permissive · top 15,000 on PyPI