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 bdist_wheel 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.2.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

govuk_bank_holidays-0.2-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for govuk-bank-holidays-0.2.tar.gz
Algorithm Hash digest
SHA256 61b9dc717a4a676cae3e37b1dc16863b802d02f477b766a57da09c559c8ad4b5
MD5 27324b691fb71f494480fac95d8b565c
BLAKE2b-256 57511652e97e4f8773005cfb6895ca488b57d060aeff95f80e2a00b4e0e51b97

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for govuk_bank_holidays-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 839922b4b9378aee405eb2f8ee2e3ac3d8c9887d08ce96e69139020fdb94188e
MD5 3ec6c5fb7ac47d914acb0f3465121c81
BLAKE2b-256 8904514932c565acee8c0150f2089916756e85c7f87bbf0a070c99dea15bea08

See more details on using hashes here.

Supported by

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