types-pytz
Typing stubs for pytz
Decision gist · record as of 2026-08-14
Yes, if you use pytz and run a static type checker. It is a lightweight, actively maintained stub package with no dependencies and permissive licensing. Install it alongside pytz in any project where type checking is part of your development workflow. If you don't use type checking, it provides no value.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Only provides type information; the actual pytz package must be installed separately for runtime functionality.
- Low friction; a pure stub package with no runtime dependencies.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows free use, modification, and distribution with minimal restrictions, suitable for both open-source and commercial projects.
last release 2026-07-27 (18 days) · last repo commit 2026-08-13 · 37 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 39,749,945 downloads/mo, #688 on PyPI
Alternatives
Verify before relying
pip install types-pytz
# In your code, type checkers will now understand pytz imports:
import pytz
tz: pytz.tzinfo = pytz.timezone('US/Eastern')- Whether this stub package is automatically discovered by type checkers or requires explicit configuration in pyproject.toml or similar.
- Coverage completeness: whether all pytz APIs are typed or if some remain untyped.
- Compatibility with pytz versions other than 2026.3.post1.
What it is and what it does
types-pytz is a type stub package that adds static type information to the pytz timezone library. It allows type checkers like mypy and pyright to understand and validate code that imports and uses pytz, catching type errors at development time rather than runtime. The stubs are maintained as part of the typeshed project, the canonical repository of type information for Python standard library and popular third-party packages.
This package contains no runtime code—it only provides type annotations. To use it, you install both types-pytz (for type checking) and the actual pytz package (for runtime). The stubs are tested against current versions of mypy and pyright to ensure they remain accurate as those tools evolve.
Use it for
- Enable mypy or pyright to type-check code that uses pytz timezone objects and methods.
- Catch timezone-related type errors during development before they reach production.
- Integrate pytz into a fully type-annotated codebase without losing type safety.
- Support IDE autocompletion and inline documentation for pytz APIs in editors like VS Code.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use pytz and run a static type checker.
It is a lightweight, actively maintained stub package with no dependencies and permissive licensing. Install it alongside pytz in any project where type checking is part of your development workflow. If you don't use type checking, it provides no value.
Install
types-pytz on PyPI
Before you install
Low friction; a pure stub package with no runtime dependencies. Actively maintained as part of typeshed, with a recent release (18 days old) and tested against mypy 2.3.0 and pyright 1.1.411.
Requires Python 3.10 or later. Only provides type information; the actual pytz package must be installed separately for runtime functionality.
License in practice
Apache-2.0 permissive license allows free use, modification, and distribution with minimal restrictions, suitable for both open-source and commercial projects.
Quickstart
pip install types-pytz
# In your code, type checkers will now understand pytz imports:
import pytz
tz: pytz.tzinfo = pytz.timezone('US/Eastern')
Verify before relying
- Whether this stub package is automatically discovered by type checkers or requires explicit configuration in pyproject.toml or similar.
- Coverage completeness: whether all pytz APIs are typed or if some remain untyped.
- Compatibility with pytz versions other than 2026.3.post1.
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 18 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 39,749,945 / month, #688 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_pytz-2026.3.1.20260727-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 › “pytz type stubs”
- types-pytzProvides type stubs for the pytz timezone library, enabling static…
- pytz-deprecation-shimProvides drop-in timezone shims that support both the standard PEP…
- django-timezone-fieldProvides Django database, form, and REST framework fields for storing…
Give your agent the search over MCP, or paste the wish link into any chat.
Similar packages
Provides type stubs for the pyflakes static analysis tool, enabling type checkers like mypy and pyright to understand and validate code that uses pyflakes.
Provides type stubs for mypy-extensions, enabling type checkers like mypy and pyright to understand code using the mypy-extensions library.
Provides type annotations for the geopandas library, enabling static type checkers like mypy and pyright to validate code that uses geopandas.
Provides type stubs for the netaddr package, enabling static type checkers like mypy and pyright to validate code that uses netaddr.
Provides type hints for the zstd compression library, enabling type checkers like mypy and pyright to validate code that uses zstd.
Provides type annotations for the python-dateutil library, enabling type checkers like mypy and pyright to validate code that uses date and time utilities.
See also types-boltons · types-unidiff · types-oauthlib · types-dateparser