Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Derive publish dates of Statements of Persons Nominated for UK elections

Project description

sopn-publish-date

Build Status Documentation Status Coverage Status PyPI Code style: black

Given the polling day of an election in the UK, when should the Statement of Persons Nominated (SoPN) be published?

When an election is called in the United Kingdom, the voting public must have access to the list of candidates who have been nominated to that post.

These documents are called Statements of Persons Nominated, and must be published a set number of working days ahead of the actual election date. The number 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.

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

Usage

from sopn_publish_date import StatementPublishDate
from datetime import date

publish_date = StatementPublishDate()

print(publish_date.national_assembly_for_wales(date(2016, 5, 5)))

# datetime.date(2016, 4, 7)

Documentation

Hosted by readthedocs at https://sopn-publish-date.readthedocs.io/

Installation

pip install sopn_publish_date

Test

python -m pytest -v

Supported Election Types

  • <input type="checkbox" checked="" disabled="" /> Local
  • <input type="checkbox" checked="" disabled="" /> United Kingdom Parliament
  • <input type="checkbox" checked="" disabled="" /> Scottish Parliament
  • <input type="checkbox" checked="" disabled="" /> National Assembly for Wales
  • <input type="checkbox" checked="" disabled="" /> Northern Ireland Assembly
  • <input type="checkbox" checked="" disabled="" /> Mayoral
  • <input type="checkbox" checked="" disabled="" /> Mayoral (London)
  • <input type="checkbox" checked="" disabled="" /> European Parliament
  • <input type="checkbox" checked="" disabled="" /> Greater London Assembly
  • <input type="checkbox" checked="" disabled="" /> 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.

Files for sopn-publish-date, version 1.4.3
Filename, size File type Python version Upload date Hashes
Filename, size sopn-publish-date-1.4.3.tar.gz (8.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page