election_day.models.election.mixins

Classes

DerivedAttributesMixin

A simple mixin to add commonly used functions to elections and their

Module Contents

class election_day.models.election.mixins.DerivedAttributesMixin[source]

A simple mixin to add commonly used functions to elections and their results.

eligible_voters: sqlalchemy.orm.Mapped[int][source]
unaccounted_ballots() int[source]

The number of unaccounted ballots.

accounted_ballots() int[source]

The number of accounted ballots.

turnout() float[source]

The turnout of the election.

classmethod _turnout_expression() sqlalchemy.sql.ColumnElement[float][source]

The turnout of the election.