skillfed

govuk-bank-holidays

Tool to load UK bank holidays from GOV.UK

govuk-bank-holidays v0.19 262.7K downloads/30d#8,369 on PyPI28
Permissive license MIT Active released

What it is and what it does

This package provides a simple interface to retrieve UK bank holidays from the official GOV.UK source, with automatic fallback to a cached list if the network is unavailable or slow. It handles the complexity of regional variation—bank holidays differ between England and Wales, Scotland, and Northern Ireland—so you can query holidays for a specific division or get only those common to all regions.

The library wraps requests to fetch fresh data on demand, but also ships with a cached backup of known holidays for offline use or as a safety net. It supports both English and Welsh locales for holiday titles and notes, and provides methods to find next and previous holidays, generate series of holidays or work days, and check specific dates.

Use it for:

  • Determine whether a given date is a UK bank holiday in a specific region for payroll or scheduling systems
  • Generate lists of upcoming bank holidays for calendar or planning applications
  • Calculate work days by excluding bank holidays from date ranges
  • Build UK-aware scheduling logic that respects regional holiday differences
  • Provide holiday information in Welsh for bilingual UK applications

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Fetches and caches the official UK bank holidays from GOV.UK, with support for regional divisions and English or Welsh locales.

Yes. The package solves a real, recurring problem (UK bank holiday lookup) with low install friction, active maintenance, no security vulnerabilities, and a permissive license. It is well-suited for any UK-based application that needs to handle holidays or work-day calculations. The regional division support and offline fallback add practical value for production use.

Install

govuk-bank-holidays on PyPI

pip

pip install govuk-bank-holidays

uv

uv add govuk-bank-holidays

poetry

poetry add govuk-bank-holidays

Installing govuk-bank-holidays

Before you install

Low friction install with a single runtime dependency (requests). Actively maintained with recent updates; last commit 2026-08-07.

License in practice

MIT license (permissive) allows free use, modification, and distribution with minimal restrictions, provided you include the license notice.

Quickstart

pip install govuk-bank-holidays

from govuk_bank_holidays.bank_holidays import BankHolidays

bank_holidays = BankHolidays()
for holiday in bank_holidays.get_holidays():
    print(holiday['title'], 'is on', holiday['date'])

Verify before relying

  • Whether the cached backup list covers all years a typical user would need to query
  • Performance characteristics when querying large date ranges or multiple divisions

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 1 — requests
Maintenance actively maintained — 170 days since the last release
Last repo commit
First released
Downloads 262,653/month — #8,369 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: govuk_bank_holidays-0.19-py3-none-any.whl

Keywords: bank holidays, govuk, uk

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python Modules

Tags

uk bank holidaysgovuk bank holidaysbritish bank holidaysuk holiday datesbank holidays by regiongov.uk holidays python
uk-holidaysscheduling

More Python Modules packages