Official Python SDK for Festivo Public Holidays API - Access 250+ countries' holiday data with UTC dates
Project description
Festivo Python SDK
Official Python SDK for the Festivo Public Holidays API. Access holiday data for 250+ countries with accurate UTC dates, regional variations, and city-level holidays.
Features
- 🌍 250+ Countries - Comprehensive holiday coverage worldwide
- 📅 UTC Dates - Accurate timezone handling for global holidays
- 🏙️ City & Regional - Support for local holidays (Pro/Builder plans)
- 🐍 Python 3.9+ - Modern Python with type hints
- 📦 Requests Based - Built on the reliable requests library
- 🧪 Well Tested - Comprehensive test suite with pytest
Installation
pip install festivo-python
Usage
from festivo import FestivoClient
import os
# Initialize client
client = FestivoClient(api_key=os.getenv("FESTIVO_API_KEY"))
# Get all holidays for a country
result = client.get_holidays('US', 2026)
print(f"Found {len(result['holidays'])} holidays")
# Get city-level holidays (Pro plan)
milan = client.get_city_holidays('IT', 'IT-MILAN', 2026)
print(milan['holidays'])
# Get regional holidays (Builder plan)
scotland = client.get_regional_holidays('GB', 'GB-SCT', 2026)
# Check if a specific date is a holiday
check = client.check_holiday('US', '2026-12-25')
if check['is_holiday']:
print(f"{check['holiday']['name']} on {check['holiday']['observed']}")
API Methods
get_holidays(country, year, **options)- Get all holidaysget_city_holidays(country, city_code, year, **options)- Get city-level holidaysget_regional_holidays(country, region_code, year, **options)- Get regional holidayscheck_holiday(country, date, regions=None)- Check if date is a holiday
Development
For local development with Poetry:
cd festivo-sdk/python
poetry install
poetry run pytest
poetry build
Links
Support
License
MIT License - see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file festivo_python-0.2.1.tar.gz.
File metadata
- Download URL: festivo_python-0.2.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.11.14 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
adfe0e95da26a3a2c669122360b767fb13a7d96eca0011e260d529f7ae7349d6
|
|
| MD5 |
5659927d0a0f98f653cec4b59cc7d119
|
|
| BLAKE2b-256 |
cb4862b5b9e3dc57d076b23cfd241a1779e61a4da98570aef423f53274537fc5
|
File details
Details for the file festivo_python-0.2.1-py3-none-any.whl.
File metadata
- Download URL: festivo_python-0.2.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.11.14 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2a6c883b5cba6a6b47c0d60d54b8a6b3dd19db28a8ea2c019f74d1f0c2ed434
|
|
| MD5 |
5022e950e6d4e243d700850957a8871b
|
|
| BLAKE2b-256 |
cf8d304cc1ad12d01699594bccf9970ae716eefa36460775bc91084b05412201
|