Skip to main content

Tool to load UK bank holidays from GOV.UK

Project description


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'])

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


Please report bugs and open pull requests on GitHub.

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

Use python compilemessages test to run all tests.

Distribute a new version by updating the VERSION tuple in govuk_bank_holidays and run python 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.

Filename, size & hash SHA256 hash help File type Python version Upload date
govuk_bank_holidays-0.3-py3-none-any.whl (12.1 kB) Copy SHA256 hash SHA256 Wheel 3.6
govuk-bank-holidays-0.3.tar.gz (8.4 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page