skillfed

pytzdata

The Olson timezone database for Python.

pytzdata v2020.1 21.1M downloads/30d#1,009 on PyPI19
Permissive license MIT DORMANT released

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 pytzdata

uv

uv add pytzdata

poetry

poetry add pytzdata

Installing 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

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Topic :: Software Development :: Libraries :: Python Modules

Tags

timezone database pythonolson timezone filestimezone data accesstz file readertimezone path lookupzoneinfo pythontimezone bundled data
timezone-dataolson-databasebundled-data

More Python Modules packages