election_day.utils.election_compound.candidates

Classes

ElectedCandidateRow

Functions

get_elected_candidates(...)

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: onegov.election_day.models.ElectionCompound | onegov.election_day.models.ElectionCompoundPart, session: sqlalchemy.orm.Session) sqlalchemy.orm.Query[ElectedCandidateRow][source]

Returns the elected candidates of an election compound.

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