parliament.collections.party ============================ .. py:module:: parliament.collections.party Attributes ---------- .. autoapisummary:: parliament.collections.party.PartyT Classes ------- .. autoapisummary:: parliament.collections.party.PartyCollection parliament.collections.party.RISPartyCollection Module Contents --------------- .. py:data:: PartyT .. py:class:: PartyCollection(session: sqlalchemy.orm.Session, active: bool | None = None) Bases: :py:obj:`onegov.core.collection.GenericCollection`\ [\ :py:obj:`PartyT`\ ] Abstract base class for generic types. A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:: class Mapping(Generic[KT, VT]): def __getitem__(self, key: KT) -> VT: ... # Etc. This class can then be used as follows:: def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT: try: return mapping[key] except KeyError: return default .. py:attribute:: active :value: None .. py:property:: model_class :type: type[PartyT] .. py:method:: query() -> sqlalchemy.orm.Query[PartyT] .. py:method:: for_filter(active: bool | None = None) -> Self .. py:class:: RISPartyCollection(session: sqlalchemy.orm.Session, active: bool | None = None) Bases: :py:obj:`PartyCollection` Abstract base class for generic types. A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:: class Mapping(Generic[KT, VT]): def __getitem__(self, key: KT) -> VT: ... # Etc. This class can then be used as follows:: def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT: try: return mapping[key] except KeyError: return default .. py:property:: model_class :type: type[onegov.parliament.models.RISParty]