elections package

Submodules

elections.greater_london_assembly

class uk_election_timetables.elections.greater_london_assembly.GreaterLondonAssemblyElection(poll_date: date)

Bases: Election

property sopn_publish_date: date

Calculate the publish date for an election to the Greater London Assembly

This is set out in The Greater London Authority Elections (Amendment) Rules 2016

Parameters:

poll_date – a datetime representing the date of the poll

Returns:

a datetime representing the expected publish date

elections.local

class uk_election_timetables.elections.local.LocalElection(poll_date: date, country: Country)

Bases: Election

property sopn_publish_date: date

Calculate the publish date for a local election.

This is set out in:

Parameters:
  • poll_date – a datetime representing the date of the poll

  • country – the country in which the election is being run

Returns:

a datetime representing the expected publish date

elections.mayor

class uk_election_timetables.elections.mayor.MayoralElection(poll_date: date)

Bases: Election

property sopn_publish_date: date

Calculate the publish date for an election to the position of Mayor in England and Wales

This is set out in The Local Authorities (Mayoral Elections) (England and Wales) (Amendment) Regulations 2014

Parameters:

poll_date – a datetime representing the date of the poll

Returns:

a datetime representing the expected publish date

elections.northern_ireland_assembly

class uk_election_timetables.elections.northern_ireland_assembly.NorthernIrelandAssemblyElection(poll_date: date)

Bases: Election

property sopn_publish_date: date

Calculate the publish date for an election to the Northern Ireland Assembly

This is set out by Schedule 5, Rules 1 and 2 of The Northern Ireland Assembly (Elections) (Amendment) Order 2009

Parameters:

poll_date – a datetime representing the date of the poll

Returns:

a datetime representing the expected publish date

elections.police_and_crime_commissioner

class uk_election_timetables.elections.police_and_crime_commissioner.PoliceAndCrimeCommissionerElection(poll_date: date)

Bases: Election

property sopn_publish_date: date

Calculate the publish date for an election to the position of Police and Crime Commissioner

This is set out in The Police and Crime Commissioner Elections (Amendment) Order 2014

Parameters:

poll_date – a datetime representing the date of the poll

Returns:

a datetime representing the expected publish date

elections.scottish_parliament

class uk_election_timetables.elections.scottish_parliament.ScottishParliamentElection(poll_date: date)

Bases: Election

property postal_vote_application_deadline: date

Calculates the postal vote application deadline for this Election

This is set out in Scottish General Election (Coronavirus) Act 2021.

Returns:

a datetime representing the postal vote application deadline

property sopn_publish_date: date

Calculate the publish date for an election to the Scottish Parliament

This is set out in The Scottish Parliament (Elections etc.) Order 2015

Parameters:

poll_date – a datetime representing the date of the poll

Returns:

a datetime representing the expected publish date

elections.senedd_cymru

class uk_election_timetables.elections.senedd_cymru.SeneddCymruElection(poll_date: date)

Bases: Election

property sopn_publish_date: date

Calculate the publish date for an election to the Senedd Cymru / Welsh Parliament

This is set out in Senedd and Elections (Wales) Act 2020 <https://www.legislation.gov.uk/anaw/2020/1/contents> and The National Assembly for Wales (Representation of the People) (Amendment) Order 2016

Parameters:

poll_date – a datetime representing the date of the poll

Returns:

a datetime representing the expected publish date

elections.uk_parliament

class uk_election_timetables.elections.uk_parliament.UKParliamentElection(poll_date: date, country: Optional[Country] = None)

Bases: Election

date_for_country(country: Country) date
property sopn_publish_date: date

Calculate the publish date for an election to the Parliament of the United Kingdom

This is set out in Representation of the People Act 1983 and its amendments.

Parameters:
  • poll_date – a datetime representing the date of the poll

  • country – an optional Country representing the country where the election will be held

Returns:

a datetime representing the expected publish date

Module contents