pytzdata
The Olson timezone database for Python.
What it is and what it does
Pytzdata bundles the Olson timezone database and exposes it through a simple Python API. It lets you access timezone definition files by name (e.g., 'Europe/Paris') either as file objects or paths, and optionally point to a custom timezone directory via function call or environment variable. The package has no runtime dependencies and installs as a pure Python wheel.
The main use case is applications that need reliable timezone data without relying on the system's zoneinfo installation. It's particularly useful when you need direct access to timezone files or want to bundle timezone data with your application. The trade-off is that the bundled database is static—it was last updated in 2020 and the package itself is no longer actively maintained.
Use it for:
- Access timezone definition files directly in applications that need raw Olson database content.
- Bundle timezone data with a Python application to avoid system zoneinfo dependencies.
- Query the path to a timezone file for use by other tools or libraries that expect a filesystem path.
- Set a custom timezone directory at runtime for testing or using an alternative timezone database.
- Provide timezone data in environments where system timezone files are unavailable or unreliable.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides access to the Olson timezone database for Python, allowing you to read timezone files and query their paths without external dependencies.
Yes, if you need bundled Olson timezone data and can accept a static 2020 database. The package is stable, has no dependencies, and installs cleanly. However, it is dormant—no active maintenance since 2020—so if you need current timezone updates or expect ongoing support, verify alternatives first.
Install
pytzdata on PyPI
pip
pip install pytzdatauv
uv add pytzdatapoetry
poetry add pytzdataInstalling pytzdata
Before you install
Low install friction with no runtime dependencies. However, the package is dormant—last release was 2020-07-13 and last commit 2024-01-06, so it receives no active maintenance.
License in practice
MIT license is permissive and places no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
pip install pytzdata
from pytzdata import tz_file, tz_path
with tz_file('Europe/Paris') as f:
# Read timezone file
pass
path = tz_path('Europe/Paris')
Verify before relying
- Whether the bundled Olson database (version 2020.1) is current enough for your timezone needs.
- Compatibility with Python 2.7 support—whether your environment still needs it or can rely on Python 3.5+.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 2,223 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 21,148,065/month — #1,009 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytzdata-2020.1-py2.py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
tzlocalReturns the IANA timezone name and tzinfo…
permissive · top 1,000 on PyPI
tzfpyConverts geographic coordinates…
permissive · top 5,000 on PyPI
django-timezone-fieldProvides Django database, form, and REST…
permissive · top 5,000 on PyPI
pytzpytz brings the Olson timezone database into…
permissive · top 100 on PyPI
timezonefinderLooks up the timezone for any WGS84 coordinate…
unclear · top 5,000 on PyPI
tzwhereLooks up the IANA timezone name for a given…
permissive · top 15,000 on PyPI
aiozoneinfoFetches timezone information asynchronously…
permissive · top 15,000 on PyPI
backports.zoneinfoProvides IANA time zone support for Python…
permissive · top 5,000 on PyPI
pendulumPendulum provides an enhanced datetime API for…
permissive · top 1,000 on PyPI
timesTimes converts between universal (UTC) time and…
permissive · top 15,000 on PyPI