Skip to main content

GOV.UK Bank Holidays

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

Bank holidays differ around the UK. The GOV.UK source currently lists these for 3 “divisions”:

  • England and Wales

  • Scotland

  • Northern Ireland

… and many methods in this library take a division parameter (c.f. constants on BankHolidays class).

NB: If no division is specified, only holidays common to all divisions are returned.

Development

https://travis-ci.org/ministryofjustice/govuk-bank-holidays.svg?branch=master

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.

Metadata

Release files for govuk-bank-holidays 0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for govuk-bank-holidays 0.4
File Size Uploaded Provenance Actions
govuk-bank-holidays-0.4.tar.gz 9.8 kB Without provenance Details for govuk-bank-holidays-0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for govuk-bank-holidays 0.4
File Interpreter ABI Platform Actions
govuk_bank_holidays-0.4-py2.py3-none-any.whl Python 3, Python 2 none any Details for govuk_bank_holidays-0.4-py2.py3-none-any.whl

Total release size: 21.5 kB

Release files / govuk-bank-holidays-0.4.tar.gz

Download URL govuk-bank-holidays-0.4.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d93dceac05baed2b1836a759f76335d93deec8abba39e5535c01e64f8a415f04
BLAKE2b-256 checksum
How to use checksums
05f67586595f676cdc61636467508eb6c891d28cc6f07d4e918c0febf563bbf1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.7

Release files / govuk_bank_holidays-0.4-py2.py3-none-any.whl

Download URL govuk_bank_holidays-0.4-py2.py3-none-any.whl
Size 11.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
c1cb6332438852c89fcd60d6e55bbc9a57b771a86caad270e6645452e1b9238e
BLAKE2b-256 checksum
How to use checksums
fefd944cccfcbcb6f2f7605ea6d12446e1981f69eeb50a239a65c14b51945cf6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.7

Security for govuk-bank-holidays 0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page