skillfed

types-polib

Typing stubs for polib

types-polib v1.2.0.20260518 243.4K downloads/30d#8,806 on PyPI37
Permissive license Apache-2.0 Active released

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-polib

uv

uv add types-polib

poetry

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 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

Programming Language :: Python :: 3Typing :: Stubs Only

Tags

type stubs polibpolib type hintsmypy polib annotationspyright polib typesgettext po file typing
type-stubstypeshed

More Software Development packages