election_day.utils.summaries ============================ .. py:module:: election_day.utils.summaries Attributes ---------- .. autoapisummary:: election_day.utils.summaries.ElectionCompoundOrPart Functions --------- .. autoapisummary:: election_day.utils.summaries.get_election_summary election_day.utils.summaries.get_election_compound_summary election_day.utils.summaries.get_vote_summary election_day.utils.summaries.get_summary election_day.utils.summaries.get_summaries Module Contents --------------- .. py:type:: ElectionCompoundOrPart :canonical: ElectionCompound | ElectionCompoundPart .. py:function:: get_election_summary(election: onegov.election_day.models.Election | onegov.election_day.models.ArchivedResult, request: onegov.election_day.request.ElectionDayRequest | None, url: str | None = None) -> onegov.core.types.JSONObject_ro Returns some basic informations about the given election as a JSON seriazable dict. .. py:function:: get_election_compound_summary(election_compound: ElectionCompoundOrPart | onegov.election_day.models.ArchivedResult, request: onegov.election_day.request.ElectionDayRequest | None, url: str | None = None, type_: str = 'election_compound') -> onegov.core.types.JSONObject_ro .. py:function:: get_vote_summary(vote: onegov.election_day.models.Vote | onegov.election_day.models.ArchivedResult, request: onegov.election_day.request.ElectionDayRequest | None, url: str | None = None) -> onegov.core.types.JSONObject_ro Returns some basic informations about the given vote as a JSON seriazable dict. .. py:function:: get_summary(item: onegov.election_day.models.Election | onegov.election_day.models.ElectionCompound | onegov.election_day.models.Vote | onegov.election_day.models.ArchivedResult, request: onegov.election_day.request.ElectionDayRequest) -> onegov.core.types.JSONObject_ro Returns some basic informations about the given election/vote as a JSON seriazable dict. .. py:function:: get_summaries(items: collections.abc.Iterable[onegov.election_day.models.Election | onegov.election_day.models.ElectionCompound | onegov.election_day.models.Vote | onegov.election_day.models.ArchivedResult], request: onegov.election_day.request.ElectionDayRequest) -> list[onegov.core.types.JSONObject_ro] Converts the given list of election/votes to a JSON seriazable list of summaries.