types-fpdf2
Typing stubs for fpdf2
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- 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.
- Low install friction with a single runtime dependency on Pillow.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing use in most projects without restriction.
last release 2026-07-24 (21 days) · last repo commit 2026-08-14 · 37 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 762,952 downloads/mo, #5,126 on PyPI
Alternatives
Verify before relying
pip install types-fpdf2
import fpdf2
pdf = fpdf2.FPDF()
pdf.add_page()
# Type checker now validates fpdf2 calls- 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
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 on this page. Verify before relying on it.
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
types-fpdf2 on PyPI
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.
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.
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
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 the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagePillow |
| Maintenance | Actively maintained 21 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 762,952 / month, #5,126 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3Typing :: Stubs Only |
Evidence: types_fpdf2-2.8.4.20260724-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 › “type stubs fpdf2”
- types-fpdf2Provides type stubs for the fpdf2 PDF generation library, enabling…
- fpdf2fpdf2 generates PDF documents programmatically in Python, supporting…
- types-assertpyProvides type stubs enabling static type checkers like mypy and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also types-docutils · fpdf2 · types-pyflakes · types-psycopg2 · types-reportlab · types-mypy-extensions · types-httplib2 · types-boltons · types-oauthlib · types-Markdown