Skip to main content

Get French public holidays from the French government API

Project description

French Public Holidays

A Python library for handling French public holidays.

Installation

pip install french-public-holidays

Usage

from french_public_holidays import FrenchPublicHolidays

fph = FrenchPublicHolidays()

# Check if a date is a French public holiday
is_holiday = fph.is_holiday('2023-07-14')
print(is_holiday)  # True (Bastille Day)

# Get the name of the holiday
holiday_name = fph.get_holiday_name('2023-07-14')
print(holiday_name)  # 'Fête nationale'

# Get all holidays for a specific year
holidays_2023 = fph.get_holidays(2023)
print(holidays_2023)

CLI

The library also comes with a CLI tool that can be used for extract public holidays in export file.

python -m french_public_holidays -c .\config.yaml

or

french-public-holidays --config .\config.yaml

Features

  • Accurately calculates French public holidays including moveable ones (Easter Monday, Ascension Day, etc.)
  • Handles regional specifics (Alsace-Moselle, DOM-TOM)
  • Works with date strings

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

If you have any questions or need support, please open an issue on the GitHub repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

french_public_holidays-0.5.7.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

french_public_holidays-0.5.7-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file french_public_holidays-0.5.7.tar.gz.

File metadata

  • Download URL: french_public_holidays-0.5.7.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.0

File hashes

Hashes for french_public_holidays-0.5.7.tar.gz
Algorithm Hash digest
SHA256 dd592c284ec77999d92b7fc6ec83ae365783b39061d006db11fb42bb39adf558
MD5 23b8421014764a13a8e0fa1741fc6f80
BLAKE2b-256 a9478b88af7567e7d86d59491bcec78c7d5347b8457d10128c6009537a1cad28

See more details on using hashes here.

File details

Details for the file french_public_holidays-0.5.7-py3-none-any.whl.

File metadata

File hashes

Hashes for french_public_holidays-0.5.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3e26c59601ec77f78839763087a4415da5d10d5933a9640433bad54cef2e2fd9
MD5 d638a70bf1ff7c3eb7b6c28043bf738e
BLAKE2b-256 e1ecd585a5f117350cf04696523428df9595c99bf6a5b7e496b3f877e112cf6f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page