Skip to main content

Derive publish dates of Statements of Persons Nominated for UK elections

Project description

sopn-publish-date

Build Status Documentation 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

  • Local
  • United Kingdom Parliament
  • Scottish Parliament
  • National Assembly for Wales
  • Northern Ireland Assembly
  • Mayoral
  • Mayoral (London)
  • European Parliament
  • 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

sopn-publish-date-1.1.0.tar.gz (8.0 kB view details)

Uploaded Source

File details

Details for the file sopn-publish-date-1.1.0.tar.gz.

File metadata

  • Download URL: sopn-publish-date-1.1.0.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for sopn-publish-date-1.1.0.tar.gz
Algorithm Hash digest
SHA256 84880cf44e0d11c604ed4565e2287821acb249bf3b354abec965794ae355b5e8
MD5 103e6b6c6009f7c1bba75ed5e43c242b
BLAKE2b-256 2c5bce9e5c3fc3f17d6519edf463cbfd1a9c446b3d279dcf31527dcf084b7dc8

See more details on using hashes here.

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