--- id: types-polib version: "1.2.0.20260518" license: Apache-2.0 license_treatment: permissive maintenance: active --- # types-polib — Typing stubs for polib License: permissive · Maintenance: active · Downloads: 243.4K/mo ## 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 above — 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 pip install types-polib uv add types-polib poetry add types-polib ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 243.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags type stubs polib, polib type hints, mypy polib annotations, pyright polib types, gettext po file typing, type-stubs, typeshed [View on SkillFed](https://skillfed.io/packages/types-polib) · [View on PyPI](https://pypi.org/project/types-polib/)