election_day.utils.notification =============================== .. py:module:: election_day.utils.notification Attributes ---------- .. autoapisummary:: election_day.utils.notification.DomainSubset Classes ------- .. autoapisummary:: election_day.utils.notification.ModelGroup Functions --------- .. autoapisummary:: election_day.utils.notification.segment_models Module Contents --------------- .. py:type:: DomainSubset :canonical: Literal['canton', 'municipality'] | None .. py:class:: ModelGroup Bases: :py:obj:`NamedTuple` .. py:attribute:: domain :type: DomainSubset .. py:attribute:: domain_segment :type: str | None .. py:attribute:: elections :type: collections.abc.Sequence[onegov.election_day.models.Election] .. py:attribute:: election_compounds :type: collections.abc.Sequence[onegov.election_day.models.ElectionCompound] .. py:attribute:: votes :type: collections.abc.Sequence[onegov.election_day.models.Vote] .. py:attribute:: filter :type: sqlalchemy.sql.ColumnElement[bool] .. py:function:: segment_models(elections: collections.abc.Sequence[onegov.election_day.models.Election], election_compounds: collections.abc.Sequence[onegov.election_day.models.ElectionCompound], votes: collections.abc.Sequence[onegov.election_day.models.Vote]) -> list[ModelGroup] Group elections, compounds and votes by subscribable notification segmenation.