Skip to main content

Derives significant dates for UK elections

Project description

uk-election-timetables

CircleCI Documentation Status PyPI Ruff

This library encapsulates timetable legislation for elections run in the United Kingdom and its devolved administrations.

The election timetable varies based on:

  • Type of Post - Parliamentary, Local, devolved Government, etc.
  • Country - The United Kingdom has up to four different rules for the same type of election, one for each country.
  • Calendar - each country has their own unique set of Bank Holidays.

Usage (publishing of candidate lists)

from datetime import date
from uk_election_timetables.elections.uk_parliament import UKParliamentElection

election = UKParliamentElection(date(2019, 2, 21))

print(election.sopn_publish_date) # date(2019, 1, 25)

Updating Bank Holiday Dates

This project checks daily for additions to the government bank holiday dataset at https://www.gov.uk/bank-holidays.json. When an addition is identified in the .gov file, this project will automatically create a GitHub issue to update our local bank holiday dataset.

To update bank-holidays.json with additions from the government supplied file, run the following within your venv:

python manage_bank_holidays.py --update

Documentation

Hosted by readthedocs at https://uk-election-timetables.readthedocs.io/

Installation

pip install uk_election_timetables

Test

pytest

Supported Election Types

  • Local
  • City of London Local
  • United Kingdom Parliament
  • Scottish Parliament
  • Senedd Cymru
  • Northern Ireland Assembly
  • Mayoral
  • Mayoral (London)
  • Greater London Assembly
  • Police and Crime commissioner
  • Referendum

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

uk_election_timetables-4.3.0.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

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

uk_election_timetables-4.3.0-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file uk_election_timetables-4.3.0.tar.gz.

File metadata

  • Download URL: uk_election_timetables-4.3.0.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for uk_election_timetables-4.3.0.tar.gz
Algorithm Hash digest
SHA256 a82fde1fc9c6afd0ed17166c24b6105c74a61e9b236dbed0ad6a7911ea33906a
MD5 4285ec51b781a1328ce95fcbb8c5ccb8
BLAKE2b-256 2320af03321e398a5ca83a4aab9874b215dd802e0c043443d728af1ff9dade7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for uk_election_timetables-4.3.0.tar.gz:

Publisher: python-publish.yml on DemocracyClub/uk-election-timetables

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uk_election_timetables-4.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for uk_election_timetables-4.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 da9b087e557f52e32641c0c32a1276d3c0256968a7a7729da65a592c24a2f78b
MD5 f5c416fb1ca013417c7143e2fab54ad3
BLAKE2b-256 3a3f808a1134bee4e81ec40ab1aa7cb9c8e5a81976d8c19ff9c30d13bf0b56ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for uk_election_timetables-4.3.0-py3-none-any.whl:

Publisher: python-publish.yml on DemocracyClub/uk-election-timetables

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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