election_day.utils.election_compound.superregions

Classes

SuperregionInfo

dict() -> new empty dictionary

Functions

get_superregions(→ dict[str, SuperregionInfo])

Returns all superregions.

get_superregions_data(→ onegov.core.types.JSONObject_ro)

Returns the data used by elections compounds for rendering entities and

Module Contents

class election_day.utils.election_compound.superregions.SuperregionInfo[source]

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

superregion: onegov.election_day.models.ElectionCompoundPart[source]
mandates: dict[str, int][source]
progress: dict[str, int][source]
election_day.utils.election_compound.superregions.get_superregions(compound: onegov.election_day.models.ElectionCompound, principal: Canton | Municipality) dict[str, SuperregionInfo][source]

Returns all superregions.

election_day.utils.election_compound.superregions.get_superregions_data(compound: onegov.election_day.models.ElectionCompound, principal: Canton | Municipality, request: ElectionDayRequest | None = None) onegov.core.types.JSONObject_ro[source]

Returns the data used by elections compounds for rendering entities and districts maps.