BrazilFiscalReport
Python library for generating Brazilian auxiliary fiscal documents in PDF from XML documents.
Decision gist · record as of 2026-08-14
Yes, if you work with Brazilian electronic invoicing. The library solves a specific, regulated problem with low install friction, active maintenance, and no security issues. LGPL-3.0 licensing is permissive for most use cases. The Beta status and optional extras warrant verification of production readiness for your specific document types before deployment.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires authorized XML from SEFAZ (Brazilian tax authority) after invoice approval; raw XML alone is insufficient.
- Low friction install with pure-Python dependencies (fpdf2, phonenumbers, python-barcode).
- Active maintenance with recent releases; last commit 2026-08-14.
License · maintenance · safety
(agpl) — Licensed under LGPL-3.0, which permits commercial use and modification provided derivative works remain under the same license and source code is made available. Suitable for proprietary applications that link to the library.
last release 2026-07-02 (43 days) · last repo commit 2026-08-14 · 115 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 85,540 downloads/mo, #13,918 on PyPI
Alternatives
Verify before relying
from brazilfiscalreport.danfe import Danfe
with open('nfe.xml', 'r', encoding='utf8') as file:
xml_content = file.read()
danfe = Danfe(xml=xml_content)
danfe.output('danfe.pdf')- Whether optional extras (dacte, damdfe, danfse, cli) are production-ready or still experimental given Beta status
- Performance characteristics when processing large batches of fiscal documents
- Compliance with current SEFAZ specifications and any recent regulatory changes
What it is and what it does
BrazilFiscalReport is a Python library that transforms authorized Brazilian electronic invoice XML files into the official printable PDF documents required by Brazilian tax law. It handles four main document types—DANFE (goods invoice), DACTE (freight bill), DAMDFE (cargo manifest), and DANFSe (service invoice)—plus the DACCe correction-letter event. The library is built on fpdf2 and requires no external tools like wkhtmltopdf or headless browsers.
The package provides three usage patterns: a Python API for programmatic control, a command-line tool (bfrep) for batch processing, and an online demo. It supports customization of issuer logos, margins, fonts, decimal precision, and watermarks. The library is actively maintained, supports Python 3.8 through 3.13, and carries no known security vulnerabilities.
Use it for
- Generate DANFE PDFs from NF-e XML in ERP systems to print and attach to shipments
- Batch-convert fiscal XML documents to PDFs for archival or compliance reporting
- Customize fiscal document appearance with company logos and specific margin/font settings
- Integrate fiscal document generation into web applications via the Python API
- Process correction-letter events (CC-e) and output DACCe PDFs for tax adjustments
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you work with Brazilian electronic invoicing.
The library solves a specific, regulated problem with low install friction, active maintenance, and no security issues. LGPL-3.0 licensing is permissive for most use cases. The Beta status and optional extras warrant verification of production readiness for your specific document types before deployment.
Install
brazilfiscalreport on PyPI
Before you install
Low friction install with pure-Python dependencies (fpdf2, phonenumbers, python-barcode). Active maintenance with recent releases; last commit 2026-08-14. Tested across Python 3.8 through 3.13.
Requires authorized XML from SEFAZ (Brazilian tax authority) after invoice approval; raw XML alone is insufficient.
License in practice
Licensed under LGPL-3.0, which permits commercial use and modification provided derivative works remain under the same license and source code is made available. Suitable for proprietary applications that link to the library.
Quickstart
from brazilfiscalreport.danfe import Danfe
with open('nfe.xml', 'r', encoding='utf8') as file:
xml_content = file.read()
danfe = Danfe(xml=xml_content)
danfe.output('danfe.pdf')
Verify before relying
- Whether optional extras (dacte, damdfe, danfse, cli) are production-ready or still experimental given Beta status
- Performance characteristics when processing large batches of fiscal documents
- Compliance with current SEFAZ specifications and any recent regulatory changes
Package facts
| License | Not declared agpl |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesfpdf2phonenumberspython-barcode |
| Maintenance | Actively maintained 43 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 85,540 / month, #13,918 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: GNU Affero General Public License v3Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules |
Evidence: brazilfiscalreport-1.0.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “brazilian fiscal document pdf generation”
- BrazilFiscalReportConverts Brazilian electronic invoice XML files (NF-e, CT-e, MDF-e,…
- validate-docbrValidates and generates Brazilian identity and registration documents…
- weasyprintWeasyPrint converts HTML and CSS into PDF documents using a…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also drafthorse · factur-x · validate-docbr · python-codicefiscale · fpdf2 · python-bcb · brazilnum · nsj-gcf-utils · sphinx-simplepdf · landingai-ade