Skip to main content

FlowPDF Python SDK

Universal Document Engine and Fluent Report Builder SDK for Python, powered by in-process Rust Core and high-throughput remote HTTP rendering.

🇩🇴 Made in the Dominican Republic — FlowPDF is an open-source Dominican library for report and PDF generation.

PyPI License: MIT


⚡ Key Highlights

  • Ultra-Fast In-Process Generation: Renders complete PDF documents in ~15ms - 40ms with zero network latency using native Rust Core.
  • Embedded Multi-Platform Runtimes: Bundles precompiled win-x64 (flowpdf_native.dll) and linux-x64 (libflowpdf_native.so) runtimes automatically loaded via ctypes.
  • Full Unicode & Spanish Accents Support: Flawlessly renders Spanish accents (á, é, í, ó, ú, ñ, Ñ), inverted marks (¿, ¡), and currency symbols (€, $, £) with WinAnsi hexadecimal encoding.
  • Fluent Report Builder: Declarative, composable, type-safe API for headers, tables, barcodes, QR codes, columns, rows, and cards.
  • Hybrid Architecture: Switch between local in-process microsecond execution or cloud HTTP worker rendering with the exact same document definition.

📦 Installation

# Install from wheel or PyPI
pip install flowpdf

Or install locally from wheel:

pip install flowpdf

🚀 Quickstart: In-Process Native PDF Generation

from flowpdf import ReportDocument, FlowPdfEngine

# 1. Build document declaratively with Fluent API
doc = (
    ReportDocument()
    .title("Factura Comercial Electrónica")
    .page(lambda p: p.a4().portrait().margin(15))
    .header(lambda h: (
        h.row(lambda r: (
            r.column(lambda c: (
                c.text("FLOWPDF ENTERPRISE").style("h2").bold().color("#1E40AF"),
                c.text("Facturación Electrónica en Español: á é í ó ú ñ Ñ ¿ ¡ €").style("caption").color("#4B5563"),
            ), flex=3),
            r.column(lambda c: (
                c.qr_code("https://example.com/verify/FAC-2026-9901", size=60),
            ), flex=1),
        ))
    ))
    .content(lambda c: (
        c.spacer(10),
        c.table(lambda t: (
            t.column("Código", "sku", lambda col: col.width(70)),
            t.column("Descripción del Artículo", "description", lambda col: col.flex(3)),
            t.column("Cant.", "quantity", lambda col: col.width(50).center()),
            t.column("Precio Unitario", "price", lambda col: col.width(90).right()),
            t.column("Total", "total", lambda col: col.width(90).right()),
            t.header_background("#1E40AF"),
            t.zebra(True),
            t.data([
                {"sku": "SRV-01", "description": "Licencia Enterprise FlowPDF Anual", "quantity": 1, "price": "€ 1,200.00", "total": "€ 1,200.00"},
                {"sku": "SUP-02", "description": "Soporte Técnico 24/7 y Consultoría", "quantity": 2, "price": "€ 150.00", "total": "€ 300.00"},
                {"sku": "TRN-03", "description": "Capacitación de Ingeniería Avanzada", "quantity": 1, "price": "€ 450.00", "total": "€ 450.00"},
            ])
        )),
        c.spacer(15),
        c.divider(1.0, color="#CBD5E1"),
        c.spacer(5),
        c.row(lambda r: (
            r.column(lambda col: (
                col.barcode("FAC20269901", barcode_type="code128", width=160, height=35),
            ), flex=1),
            r.column(lambda col: (
                col.text("Subtotal: € 1,950.00").align("right"),
                col.text("ITBIS / IVA (18%): € 351.00").align("right"),
                col.text("Total Facturado: € 2,301.00").style("h2").bold().color("#16A34A").align("right"),
            ), flex=1),
        )),
    ))
    .footer(lambda f: (
        f.text("Documento generado in-process con FlowPDF Rust Core").style("caption").center()
    ))
)

# 2. Render directly in-process to PDF in ~30 ms!
pdf_bytes = doc.render_pdf()

with open("factura_electronica.pdf", "wb") as f:
    f.write(pdf_bytes)

print(f"✅ PDF generado exitosamente ({len(pdf_bytes)} bytes)!")

🌐 Remote HTTP Rendering (Cloud / Server)

from flowpdf import FlowPdfClient, ReportDocument

client = FlowPdfClient(base_url="http://localhost:8000", api_key="secret-api-key")

doc = (
    ReportDocument()
    .title("Reporte Remoto")
    .content(lambda c: c.text("Generado en worker asíncrono con Celery y Redis").style("h1"))
)

# Render via HTTP
response = client.render(template_data=doc.build(), format="pdf")
response.save("reporte_remoto.pdf")

📄 License

MIT © 2026 Edwin Abreu, Felix R. Benzan & FlowPDF Contributors.

Metadata

Release files for flowpdf 1.1.7

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

Source distribution (sdist)

Source distribution for flowpdf 1.1.7
File Size Uploaded Provenance Actions
flowpdf-1.1.7.tar.gz 3.8 MB With provenance Details for flowpdf-1.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flowpdf 1.1.7
File Interpreter ABI Platform Actions
flowpdf-1.1.7-py3-none-any.whl Python 3 none any Details for flowpdf-1.1.7-py3-none-any.whl

Total release size: 7.7 MB

Release files / flowpdf-1.1.7.tar.gz

Download URL flowpdf-1.1.7.tar.gz
Size 3.8 MB
Tags Source
SHA-256 checksum
How to use checksums
8d9154e6449d18dd1c9d7ba7f20139217b7df26df4b940e84650c179271ceb51
BLAKE2b-256 checksum
How to use checksums
befa53bf1bf51c4cad11f467cffcf09f823d856e857bd7f704cf1f3a6b7ef37d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / flowpdf-1.1.7-py3-none-any.whl

Download URL flowpdf-1.1.7-py3-none-any.whl
Size 3.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
153ecbdaae8f6666f786b1372ea77fd37a1e569b5c1f5f43b918fb263d4633bb
BLAKE2b-256 checksum
How to use checksums
578c2486f7ba0a08689878b743d97ef06fa33d65f6101701681ba601edd7eb3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for flowpdf 1.1.7

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for flowpdf-1.1.7.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

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