PYPI PACKAGE AUDIT v0.109 Enterprise Healthy

holidays

Open World Holidays Framework

PyPkgScore holidays
Methodology & Criteria ♥ Donate
905 / 1000
Quick Install
pip install holidays
1. Governance
150/200
2. PEP Metadata
200/200
3. Security
200/200
4. Docs & SEO
155/200
5. CI Engineering
200/200
📣 Share Audit: Share this report and visual preview in the current language
Advertisement
PYPI TELEMETRY

Downloads & Community Adoption

Last 30 days (without mirrors)
Last 7 days
7695039
Last 30 days
33128561
Total (180 days)
179085087
Metric / Ecosystem Status / Value Source
Downloads (30d / 180d) — PyPI Stats (without mirrors)
Trusted Publishing (PEP 740) ✓ Verified OIDC PyPI Integrity / Sigstore
Django Packages — djangopackages.org
PyTech / PyPkgScore 905 / 1000 PyPkgScore Engine

Health & Engineering Analysis (5 Pillars)

1. Governance & Community150 / 200 ▾
LICENSE✓ 50 pts
SECURITY.md✓ 50 pts
CONTRIBUTING.md✓ 50 pts
CODE_OF_CONDUCT.md✕ 0 pts
2. PEP Metadata & Packaging200 / 200 ▾
Wheel (.whl)✓ 50 pts
pyproject.toml✓ 50 pts
Project URLs✓ 50 pts
Trove Classifiers✓ 50 pts
3. Security & Supply Chain200 / 200 ▾
Zero CVEs (OSV)✓ 60 pts
Trusted Publishing (OIDC)✓ 50 pts
Snyk / Audit Link✓ 40 pts
HTTPS Repository✓ 50 pts
4. Documentation, SEO & Ecosystem155 / 200 ▾
Structured README✓ 60 pts
Read the Docs✓ 50 pts
Django Packages✕ 0 pts
Website / Technical Articles✓ 45 pts
5. Engineering, CI & Quality200 / 200 ▾
Automated Tests✓ 65 pts
GitHub Actions CI✓ 65 pts
CHANGELOG.md✓ 35 pts
Env & Lockfile (uv/rye/poetry/pdm/hatch)✓ 35 pts
Advertisement
README & DOCS

Official Documentation & Usage Guide — holidays

PyPI Metadata v0.109
Show full original documentation (English README) ▾

Holidays

A fast, efficient Python library for generating country- and subdivision- (e.g. state or province) specific sets of government-designated holidays on the fly. It aims to make determining whether a specific date is a holiday as fast and flexible as possible.

Install

The latest stable version can always be installed or updated via pip:

pip install --upgrade holidays

The latest pre-release version can always be installed or updated via pip:

pip install --upgrade --pre holidays

All new features are first pushed to the dev branch and published as PyPI pre-releases, then released from main on official version upgrades. We normally follow a release schedule, typically on the 1st and 3rd Tuesday of each month.

On dev, the VERSION file holds the upcoming stable version (for example 0.103). Pre-release publishes append a UTC timestamp in CI only (0.103.devYYYYMMDDHHMMSS); that .dev form is what appears on PyPI and is not committed back to the repository.

Documentation

The documentation is hosted on Read the Docs.

ICS Exports

Holiday calendars can be exported as .ics files via holidays-ics command line tool, or from the Download Holiday Calendars page.

Quick Start

from datetime import date
import holidays

us_holidays = holidays.US()  # this is a dict-like object
# the below is the same, but takes a string:
us_holidays = holidays.country_holidays("US")  # this is a dict-like object

nyse_holidays = holidays.NYSE()  # this is a dict-like object
# the below is the same, but takes a string:
nyse_holidays = holidays.financial_holidays("NYSE")  # this is a dict-like object

date(2015, 1, 1) in us_holidays  # True
date(2015, 1, 2) in us_holidays  # False
us_holidays.get("2014-01-01")  # "New Year's Day"

The HolidayBase dict-like class will also recognize date strings and Unix timestamps:

"2014-01-01" in us_holidays  # True
"1/1/2014" in us_holidays  # True
1388597445 in us_holidays  # True

Some holidays may be only present in parts of a country:

us_pr_holidays = holidays.country_holidays("US", subdiv="PR")
"2018-01-06" in us_holidays  # False
"2018-01-06" in us_pr_holidays  # True

Please see the holidays documentation for additional examples and detailed information.

Available Countries

We currently support 250 country codes, which primarily follow ISO 3166-1, with a small number of widely used user-assigned or reserved codes (for example, XK for Kosovo). In general, the standard way to refer to a country is by using its ISO 3166-1 alpha-2 code, the same used for domain names, and for a subdivision its ISO 3166-2 code. Some countries have common or foreign names or abbreviations as aliases for their subdivisions. These are defined in the (optional) subdivisions_aliases attribute.

[!note] Subdivisions aliases

Aliases are optional. When present, subdivisions_aliases cover only a subset of subdivisions - commonly used or officially recognized alternative names. Supported subdivisions and their aliases (where available) are listed in the Subdivisions column of the table below.

Some of the countries support more than one language for holiday names output. A default language is defined by default_language (optional) attribute for each entity and is used as a fallback when neither user specified language nor user locale language available. The default language code is a ISO 639-1 code. A list of all languages supported by country is defined by supported_languages (optional) attribute. If there is no designated ISO 639-1 code then ISO 639-2 code can be used.

Many countries have other categories of holidays in addition to common (national-wide) holidays: bank holidays, school holidays, additional (paid or non-paid) holidays, holidays of state or public employees, religious holidays (valid only for these religions followers). A list of all categories supported by country is defined by supported_categories (optional) attribute.

The following is a list of supported countries, their subdivisions followed by their aliases (if any) in brackets, available languages and additional holiday categories. All countries support PUBLIC holidays category by default. All other default values are highlighted with bold:

Available Financial Markets

The standard way to refer to a financial market is to use its ISO 10383 MIC (Market Identifier Code) as a "market" code when available. The following financial markets are available:

Contributions

Issues and pull requests are always welcome. Please see CONTRIBUTING.md for more information.

License

Code and documentation are available according to the MIT License (see LICENSE).