Skip to main content

Tool to load UK bank holidays from GOV.UK

Project description

Usage

Install using pip install govuk-bank-holidays. Sample usage:

from govuk_bank_holidays.bank_holidays import BankHolidays

bank_holidays = BankHolidays()
for bank_holiday in bank_holidays.get_holidays():
    print(bank_holiday['title'], '>', bank_holiday['date'])
print(bank_holidays.get_next_holiday())

# choose a different locale for holiday titles and notes
bank_holidays = BankHolidays(locale='cy')

Development

Please report bugs and open pull requests on GitHub.

Update translation files using python setup.py makemessages, e.g. when updating the i18n module or when adding new languages. Compile them using python setup.py compilemessages; this is required before testing and distribution.

Use python setup.py compilemessages test to run all tests.

Distribute a new version by updating the VERSION tuple in govuk_bank_holidays and run python setup.py compilemessages sdist upload.

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

govuk-bank-holidays-0.1.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

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

govuk_bank_holidays-0.1-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file govuk-bank-holidays-0.1.tar.gz.

File metadata

File hashes

Hashes for govuk-bank-holidays-0.1.tar.gz
Algorithm Hash digest
SHA256 897ea4a9a46722c773121ecf45ccb046624ecbb74b2e7a44b440358d6f01a38c
MD5 33e000dfab53a29be9ce6fc1db0d3471
BLAKE2b-256 124b28a9f45b0055c5eef8846a14f6c1b70a6a6b4272f6387542d097c76329fc

See more details on using hashes here.

File details

Details for the file govuk_bank_holidays-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for govuk_bank_holidays-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 856dd7147bc6883f68fb6a9ae624ddf1bc243fe136c8bcc5b32cbb6add37ae04
MD5 a8b925b0671c9f91db24b3488b7649a3
BLAKE2b-256 066991cd70fb3155a702ba420c419ae687195b0cd7afced3fd46cf5df3ed58bf

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