org.models.parliament

Classes

RISCommission

Mixin providing a meta/content JSON pair. Meta is a JSON column loaded

RISCommissionCollection

Abstract base class for generic types.

RISCommissionMembership

Mixin providing created/modified timestamps for all records.

RISCommissionMembershipCollection

Abstract base class for generic types.

RISParliamentarian

Mixin providing a meta/content JSON pair. Meta is a JSON column loaded

RISParliamentarianCollection

Abstract base class for generic types.

RISParliamentarianRole

Mixin providing created/modified timestamps for all records.

RISParliamentarianRoleCollection

Abstract base class for generic types.

RISParliamentaryGroup

Fraktion

RISParliamentaryGroupCollection

Abstract base class for generic types.

Module Contents

class org.models.parliament.RISCommission[source]

Bases: onegov.parliament.models.Commission, onegov.search.ORMSearchable

Mixin providing a meta/content JSON pair. Meta is a JSON column loaded with each request, content is a JSON column loaded deferred (to be shown only in the detail view).

__mapper_args__[source]
es_type_name = 'ris_commission'[source]

Returns the unique type name of the model.

es_public = True[source]

Returns True if the model is available to be found by the public. If false, only editors/admins will see this object in the search results.

es_properties[source]
property es_suggestion: str[source]

Returns suggest-as-you-type value of the document. The field used for this property should also be indexed, or the suggestion will lead to nowhere.

If a single string is returned, the completion input equals the completion output. (My Title -> My Title)

If an array of strings is returned, all values are possible inputs and the first value is the output. (My Title/Title My -> My Title)

class org.models.parliament.RISCommissionCollection(session: sqlalchemy.orm.Session, active: bool | None = None)[source]

Bases: onegov.parliament.collections.CommissionCollection[RISCommission]

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
property model_class: type[RISCommission][source]
class org.models.parliament.RISCommissionMembership[source]

Bases: onegov.parliament.models.CommissionMembership

Mixin providing created/modified timestamps for all records.

The columns are deferred loaded as this is primarily for logging and future forensics.

__mapper_args__[source]
class org.models.parliament.RISCommissionMembershipCollection(session: sqlalchemy.orm.Session, active: bool | None = None)[source]

Bases: onegov.parliament.collections.CommissionMembershipCollection[RISCommissionMembership]

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
active = None[source]
property model_class: type[RISCommissionMembership][source]
query() sqlalchemy.orm.Query[RISCommissionMembership][source]
for_filter(active: bool | None = None) Self[source]
class org.models.parliament.RISParliamentarian[source]

Bases: onegov.parliament.models.Parliamentarian, onegov.search.ORMSearchable

Mixin providing a meta/content JSON pair. Meta is a JSON column loaded with each request, content is a JSON column loaded deferred (to be shown only in the detail view).

__mapper_args__[source]
es_type_name = 'ris_parliamentarian'[source]

Returns the unique type name of the model.

es_public = False[source]

Returns True if the model is available to be found by the public. If false, only editors/admins will see this object in the search results.

es_properties[source]
property title: str[source]
property es_suggestion: tuple[str, Ellipsis][source]

Returns suggest-as-you-type value of the document. The field used for this property should also be indexed, or the suggestion will lead to nowhere.

If a single string is returned, the completion input equals the completion output. (My Title -> My Title)

If an array of strings is returned, all values are possible inputs and the first value is the output. (My Title/Title My -> My Title)

political_businesses: sqlalchemy.orm.relationship[list[onegov.org.models.PoliticalBusinessParticipation]][source]
active() bool[source]
class org.models.parliament.RISParliamentarianCollection(session: sqlalchemy.orm.Session, active: collections.abc.Collection[bool] | None = None, party: collections.abc.Collection[str] | None = None)[source]

Bases: onegov.parliament.collections.ParliamentarianCollection[RISParliamentarian]

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
property model_class: type[RISParliamentarian][source]
class org.models.parliament.RISParliamentarianRole[source]

Bases: onegov.parliament.models.ParliamentarianRole

Mixin providing created/modified timestamps for all records.

The columns are deferred loaded as this is primarily for logging and future forensics.

__mapper_args__[source]
class org.models.parliament.RISParliamentarianRoleCollection(session: sqlalchemy.orm.Session, **kwargs: Any)[source]

Bases: onegov.parliament.collections.ParliamentarianRoleCollection[RISParliamentarianRole]

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
property model_class: type[RISParliamentarianRole][source]
class org.models.parliament.RISParliamentaryGroup[source]

Bases: onegov.parliament.models.ParliamentaryGroup, onegov.search.ORMSearchable

Fraktion

__mapper_args__[source]
es_type_name = 'ris_parliamentary_group'[source]

Returns the unique type name of the model.

es_public = True[source]

Returns True if the model is available to be found by the public. If false, only editors/admins will see this object in the search results.

es_properties[source]
political_businesses: sqlalchemy.orm.relationship[list[onegov.org.models.PoliticalBusiness]][source]
property es_suggestion: str[source]

Returns suggest-as-you-type value of the document. The field used for this property should also be indexed, or the suggestion will lead to nowhere.

If a single string is returned, the completion input equals the completion output. (My Title -> My Title)

If an array of strings is returned, all values are possible inputs and the first value is the output. (My Title/Title My -> My Title)

class org.models.parliament.RISParliamentaryGroupCollection(session: sqlalchemy.orm.Session, active: bool | None = None)[source]

Bases: onegov.parliament.collections.ParliamentaryGroupCollection[RISParliamentaryGroup]

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
property model_class: type[RISParliamentaryGroup][source]