--- id: types-fpdf2 version: "2.8.4.20260724" license: Apache-2.0 license_treatment: permissive maintenance: active --- # types-fpdf2 — Typing stubs for fpdf2 License: permissive · Maintenance: active · Downloads: 763.0K/mo ## What it is and what it does types-fpdf2 is a type stub package that provides type annotations for the fpdf2 PDF generation library. It allows static type checkers like mypy and pyright to validate code that uses fpdf2, catching type errors before runtime. The stubs are maintained as part of the typeshed project and were tested against mypy 2.3.0 and pyright 1.1.411. This package is most useful for projects using fpdf2 versions before 2.8.6, which did not include built-in type annotations. For fpdf2 2.8.6 and later, the library itself provides type annotations, making this stub package unnecessary. The package has a single runtime dependency on Pillow and requires Python 3.10 or later. Use it for: - Type-checking fpdf2 code in projects using mypy or pyright with fpdf2 versions before 2.8.6 - Validating PDF generation logic in CI/CD pipelines that enforce strict type checking - Enabling IDE autocompletion and type hints for fpdf2 API calls during development - Migrating legacy fpdf2 code to a typed codebase without upgrading fpdf2 itself ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides type stubs for the fpdf2 PDF generation library, enabling static type checkers like mypy and pyright to validate code that uses fpdf2. Yes, if you use fpdf2 versions before 2.8.6 and want static type checking. No, if you use fpdf2 2.8.6 or later—uninstall this package and rely on fpdf2's built-in annotations instead. The package is actively maintained, has no known vulnerabilities, and installs with minimal friction. ## Install pip install types-fpdf2 uv add types-fpdf2 poetry add types-fpdf2 ## Installing types-fpdf2 Before you install: Low install friction with a single runtime dependency on Pillow. Actively maintained as part of typeshed; released 21 days ago with no known vulnerabilities. License in practice: Licensed under Apache-2.0 (permissive), allowing use in most projects without restriction. Quickstart: pip install types-fpdf2 import fpdf2 pdf = fpdf2.FPDF() pdf.add_page() # Type checker now validates fpdf2 calls Requires Python 3.10 or later. Note: fpdf2 version 2.8.6 and later include built-in type annotations, making this package redundant for those versions. Verify before relying: - Whether the stubs remain accurate for fpdf2 versions after 2.8.4, given that fpdf2 2.8.6+ includes its own annotations - Practical compatibility with fpdf2 versions between 2.8.4 and 2.8.6 ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 763.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags type stubs fpdf2, fpdf2 type hints, type checking pdf generation, mypy fpdf2 annotations, static typing pdf library, type-stubs, static-typing [View on SkillFed](https://skillfed.io/packages/types-fpdf2) · [View on PyPI](https://pypi.org/project/types-fpdf2/)