Python holidays

Package

Python library that computes public and bank holidays for 250 countries offline

Price
Free, open source
Access
None, runs locally

About

holidays is an MIT-licensed Python library that generates country- and subdivision-specific holidays on the fly for 250 country codes, with bank, school and religious categories, financial market calendars and localized names. No network calls or keys. Requires Python 3.10 or later.

What you can do with it

  • Check whether a date is a public or bank holiday in Python
  • Get the holidays of a US state, German state or other subdivision
  • Count working days around holidays and NYSE trading closures

Get started

  1. Install the package with pip install holidays
  2. Build a holiday set with holidays.country_holidays(code, years=...)

Example

import holidays

tr_holidays = holidays.country_holidays("TR", years=2026)
for day, name in sorted(tr_holidays.items()):
    print(day, name)

Details

Hosting
Runs locally
Available in
Worldwide
Official SDKs
Python
MCP server
None

Tasks

Alternatives

Other tools for the same tasks.

Last checked on .