election_day.utils.election_compound.candidates

Classes

ElectedCandidateRow

Functions

get_elected_candidates(→ Query[ElectedCandidateRow])

Returns the elected candidates of an election compound.

get_candidate_statistics(→ dict[str, CandidateStatistics])

Module Contents

class election_day.utils.election_compound.candidates.ElectedCandidateRow[source]

Bases: NamedTuple

family_name: str[source]
first_name: str[source]
party: str | None[source]
gender: onegov.election_day.types.Gender | None[source]
year_of_birth: int | None[source]
list: str | None[source]
list_id: str | None[source]
election_id: str | None[source]
election_day.utils.election_compound.candidates.get_elected_candidates(election_compound: ElectionCompound | ElectionCompoundPart, session: sqlalchemy.orm.Session) Query[ElectedCandidateRow][source]

Returns the elected candidates of an election compound.

election_day.utils.election_compound.candidates.get_candidate_statistics(election_compound: ElectionCompound | ElectionCompoundPart, elected_candidates: Iterable[ElectedCandidateRow] | None = None) dict[str, CandidateStatistics][source]