pas.collections.attendence
Classes
Abstract base class for generic types.  | 
Module Contents
- class pas.collections.attendence.AttendenceCollection(session: sqlalchemy.orm.Session, settlement_run_id: str | None = None, date_from: datetime.date | None = None, date_to: datetime.date | None = None, type: str | None = None, parliamentarian_id: str | None = None, commission_id: str | None = None, party_id: str | None = None)[source]
 Bases:
onegov.core.collection.GenericCollection[onegov.pas.models.Attendence]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
- for_filter(settlement_run_id: str | None = None, date_from: datetime.date | None = None, date_to: datetime.date | None = None, type: str | None = None, parliamentarian_id: str | None = None, commission_id: str | None = None, party_id: str | None = None) Self[source]
 
- by_party(party_id: str, start_date: datetime.date, end_date: datetime.date) Self[source]
 Filter attendances by party membership during a period. Returns attendances where the parliamentarian belonged to the party at any point during the period.
- for_parliamentarian(parliamentarian_id: str) Self[source]
 Returns attendances for a specific parliamentarian only.