Skip to main content

Derives significant dates for UK elections

Project description

uk-election-timetables

Build Status Documentation Status PyPI Code style: black

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
  • United Kingdom Parliament
  • Scottish Parliament
  • Senedd Cymru
  • Northern Ireland Assembly
  • Mayoral
  • Mayoral (London)
  • Greater London Assembly
  • Police and Crime commissioner

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-2.3.0.tar.gz (12.0 kB view details)

Uploaded Source

File details

Details for the file uk-election-timetables-2.3.0.tar.gz.

File metadata

File hashes

Hashes for uk-election-timetables-2.3.0.tar.gz
Algorithm Hash digest
SHA256 9551838ecd672234a738e973928e3f462b561b5ae7c31a8c1dae54dff0c38d01
MD5 578e6d9bf6fa5358497c5c6d80a25b93
BLAKE2b-256 3b36eef253f493bcc4fb661fe9f31fd229e69bec72f01cb04302099acf1110d4

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page