Derives significant dates for UK elections
Project description
uk-election-timetables
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for uk-election-timetables-4.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12d7b8b141254fb9a02114438c6db4063dce2867bf42205da0b7d2bea787150e |
|
MD5 | cda8fb4b96da7516cbca00ad13229c3e |
|
BLAKE2b-256 | a9d99710aada5d860053064f799355e66c144b5e0cc13b920a299d0d471ab636 |
Hashes for uk_election_timetables-4.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a4e857ae1465bd6c6cc0918722b0dc9373577794aa5d60c3ac7363270b66470 |
|
MD5 | a345aed1c01e3e4b2fe3123329a24189 |
|
BLAKE2b-256 | 440ff6aa2f37c514d69b9e7a877fdf146af6c66c0b93662dc6fd5310d21892a8 |