types-polib
Typing stubs for polib
What it is and what it does
types-polib is a type stub package that bridges the gap between the polib library (used for reading and writing gettext PO translation files) and Python's static type checkers. When installed, it allows mypy, pyright, and other type checkers to understand the types and signatures of polib's public API, so you can catch type errors in your code before runtime.
This is a pure metadata package with no runtime dependencies—it only provides type information. It's part of the typeshed project, the community-maintained repository of type stubs for popular packages that don't ship their own. The stubs are kept in sync with polib 1.2.x and tested against current versions of mypy and pyright.
Use it for:
- Enable type checking in projects that use polib to parse or generate gettext PO translation files.
- Catch type errors in translation workflow automation scripts before deployment.
- Improve IDE autocomplete and inline documentation when working with polib in type-aware editors.
- Enforce type safety in CI/CD pipelines that validate translation tooling code.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type stubs for the polib package, enabling static type checkers like mypy and pyright to validate code that uses polib for working with gettext PO files.
Yes, if you use polib and want static type checking. It has no runtime cost, no dependencies, and is actively maintained. Install it alongside polib and configure your type checker to use it. If you don't use a type checker or don't use polib, it provides no value.
Install
types-polib on PyPI
pip
pip install types-polibuv
uv add types-polibpoetry
poetry add types-polibInstalling types-polib
Before you install
Low friction: a pure-Python stub package with no runtime dependencies. Actively maintained as part of typeshed; last commit 2026-08-14. Tested with mypy 2.1.0 and pyright 1.1.409.
License in practice
Apache-2.0 permissive license; no restrictions on use, modification, or distribution in commercial or open-source projects.
Quickstart
pip install types-polib
# In your code, import polib normally; type checkers will use the stubs:
import polib
po = polib.pofile('translations.po')
Requires Python 3.10 or later. Only useful when used alongside polib itself and a type checker (mypy, pyright, or similar).
Verify before relying
- Whether the stubs cover all public APIs of polib 1.2.x or only a subset.
- Whether this package is automatically installed as a dependency of polib or must be installed separately.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 88 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 243,375/month — #8,806 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_polib-1.2.0.20260518-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
types-grpcio-health-checkingProvides type stubs for grpcio-health-checking,…
permissive · top 15,000 on PyPI
types-ldap3Provides type stubs for the ldap3 package,…
permissive · top 15,000 on PyPI
types-pexpectProvides type stubs for pexpect, enabling type…
permissive · top 5,000 on PyPI
types-protobufProvides type stubs for the protobuf package,…
permissive · top 1,000 on PyPI
types-qrcodeProvides type stubs for the qrcode package,…
permissive · top 15,000 on PyPI
types-vobjectProvides type stubs for the vobject package,…
permissive · top 15,000 on PyPI
polibpolib reads, writes, and manipulates gettext…
permissive · top 5,000 on PyPI
types-psutilProvides type annotations for the psutil…
permissive · top 5,000 on PyPI
types-mockProvides type stubs for the mock library,…
permissive · top 5,000 on PyPI
types-cffiProvides type stubs for the cffi package,…
permissive · top 5,000 on PyPI