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_public_holiday('2023-07-14')
print(is_holiday)  # True (Bastille Day)

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

# Get all holidays for a specific year
holidays_2023 = fph.get_public_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.8.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.8-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: french_public_holidays-0.5.8.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.8.tar.gz
Algorithm Hash digest
SHA256 2660325e7f03cb957d3931e6ddb73d73a8071aeb7c420ca5e24e2a69148ab80a
MD5 5b1c925d2d2dcf485d1afd59c2c1efc0
BLAKE2b-256 8fa9b1b07495ecf161db2cbff8f6f815e6aec7b06dc4d3a104ac3fb504886b15

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for french_public_holidays-0.5.8-py3-none-any.whl
Algorithm Hash digest
SHA256 6ce9fa1ef19cfff83a5a10ff4aa64f66d199d089d9b7882289c1433a6c21f756
MD5 0e36464966f23b1aabba6f3d1635758e
BLAKE2b-256 c7e4b0b0c3a5464d482ce3cab8c7374df39f26b584883266b58f0b1dd947c32d

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