election_day.utils.election_compound.superregions
=================================================

.. py:module:: election_day.utils.election_compound.superregions


Classes
-------

.. autoapisummary::

   election_day.utils.election_compound.superregions.SuperregionInfo


Functions
---------

.. autoapisummary::

   election_day.utils.election_compound.superregions.get_superregions
   election_day.utils.election_compound.superregions.get_superregions_data


Module Contents
---------------

.. py:class:: SuperregionInfo

   Bases: :py:obj:`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)


   .. py:attribute:: superregion
      :type:  onegov.election_day.models.ElectionCompoundPart


   .. py:attribute:: mandates
      :type:  dict[str, int]


   .. py:attribute:: progress
      :type:  dict[str, int]


.. py:function:: get_superregions(compound: onegov.election_day.models.ElectionCompound, principal: onegov.election_day.models.Canton | onegov.election_day.models.Municipality) -> dict[str, SuperregionInfo]

   Returns all superregions. 


.. py:function:: get_superregions_data(compound: onegov.election_day.models.ElectionCompound, principal: onegov.election_day.models.Canton | onegov.election_day.models.Municipality, request: onegov.election_day.request.ElectionDayRequest | None = None) -> onegov.core.types.JSONObject_ro

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