pymupdf-stubs
Type stubs for PyMuPDF (fitz), automatically generated
Decision gist · record as of 2026-08-14
Yes, if you use PyMuPDF and want static type checking. The package is actively maintained, has no security vulnerabilities, carries a permissive license, and adds no runtime cost. The main caveat is that some dynamic PyMuPDF APIs may not be fully typed, so you may encounter Any types in edge cases—check the repository if you need comprehensive coverage for your specific use case.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.12 or later; pymupdf must be installed separately as the runtime dependency.
- Active maintenance with a release 4 days ago; low install friction as a stub-only package with a single runtime dependency on pymupdf.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows use in most projects without significant restrictions.
last release 2026-08-10 (4 days) · last repo commit 2026-08-10 · 1 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 121,119 downloads/mo, #11,995 on PyPI
Alternatives
Verify before relying
pip install pymupdf-stubs
import pymupdf
doc = pymupdf.Document()
page = doc[0]
drawings = page.get_drawings()- Coverage completeness: whether all PyMuPDF APIs are typed or if significant portions remain as Any/broad dictionaries.
- Compatibility lag: how quickly stubs are updated when PyMuPDF releases new versions.
What it is and what it does
pymupdf-stubs is a PEP 561 stub-only package that provides type annotations for PyMuPDF, the Python binding for MuPDF used to read and manipulate PDF documents. It enables static type checkers like mypy to understand PyMuPDF's API surface without adding runtime overhead. The stubs support both the pymupdf and fitz module names (fitz is a compatibility re-export).
Installing the stubs requires no changes to existing code—you install the package and run your type checker. Some highly dynamic PyMuPDF APIs may still be typed as Any or broad dictionary shapes, and the maintainer welcomes issues for missing or incorrect type annotations. The package targets current PyMuPDF releases and is actively maintained.
Use it for
- Enable mypy or other type checkers to validate PDF processing code written with PyMuPDF.
- Catch type errors in document manipulation workflows before runtime.
- Improve IDE autocomplete and inline documentation for PyMuPDF methods and classes.
- Support fitz-based legacy code with modern type-checking tooling.
- Validate type safety in PDF extraction and transformation pipelines.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use PyMuPDF and want static type checking.
The package is actively maintained, has no security vulnerabilities, carries a permissive license, and adds no runtime cost. The main caveat is that some dynamic PyMuPDF APIs may not be fully typed, so you may encounter Any types in edge cases—check the repository if you need comprehensive coverage for your specific use case.
Install
pymupdf-stubs on PyPI
Before you install
Active maintenance with a release 4 days ago; low install friction as a stub-only package with a single runtime dependency on pymupdf.
Requires Python 3.12 or later; pymupdf must be installed separately as the runtime dependency.
License in practice
Apache-2.0 permissive license allows use in most projects without significant restrictions.
Quickstart
pip install pymupdf-stubs
import pymupdf
doc = pymupdf.Document()
page = doc[0]
drawings = page.get_drawings()
Verify before relying
- Coverage completeness: whether all PyMuPDF APIs are typed or if significant portions remain as Any/broad dictionaries.
- Compatibility lag: how quickly stubs are updated when PyMuPDF releases new versions.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.12 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagepymupdf |
| Maintenance | Actively maintained 4 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 121,119 / month, #11,995 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: UtilitiesTyping :: Stubs Only |
Evidence: pymupdf_stubs-1.28.2-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 › “pymupdf type stubs”
- pymupdf-stubsProvides type stubs for PyMuPDF to enable static type checking of PDF…
- pymupdf-fontsProvides a collection of optional fonts (FiraGO, FiraMono, Space…
- pymupdfproPyMuPDF Pro extends PyMuPDF with commercial Office document…
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 pydub-stubs · types-click · types-tornado · types-humanfriendly · types-Flask · types-Werkzeug · docutils-stubs · scipy-stubs · types-Pillow · PyMuPDFb