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.4.0.tar.gz (18.7 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.4.0-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for uk_election_timetables-4.4.0.tar.gz
Algorithm Hash digest
SHA256 1462ee03dad497550078d1a3728ee88aa5c92a226fef0c9d1fddc525663658df
MD5 7bc6d81edec66a86d0fdb8c116ee0fa6
BLAKE2b-256 247efcb9e159c3e38b38305e0d51d2737d5680a993e6180c5e1e09477efb6a25

See more details on using hashes here.

Provenance

The following attestation bundles were made for uk_election_timetables-4.4.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.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for uk_election_timetables-4.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f14a84d6f95cac34835018d8292b3e664bad8cd98323795477976bf89d744973
MD5 99d460f1c11127f27b8ea822bb6883de
BLAKE2b-256 796c6351387e8e88e97d6e2bfb65bc895018199f0e59277d4e03927dd18c3ed7

See more details on using hashes here.

Provenance

The following attestation bundles were made for uk_election_timetables-4.4.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