skillfed

factur-x

Factur-X and Order-X: electronic invoicing and ordering standards

factur-x v6.7 318.2K downloads/30d#7,655 on PyPI303
Permissive 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) Active released

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-x

uv

uv add factur-x

poetry

poetry add factur-x

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyTopic :: Office/Business :: Financial :: Accounting

Tags

factur-x invoice generationelectronic invoicing pythone-invoice xml pdforder-x purchase orderszugferd invoicingubl xml documentsen 16931 compliance
e-invoicingxml-processingpdf-manipulation

More Accounting packages