pas.importer.types

Type definitions for JSON import data structures.

Classes

EmailData

dict() -> new empty dictionary

AddressData

dict() -> new empty dictionary

PhoneNumberData

dict() -> new empty dictionary

UrlData

dict() -> new empty dictionary

OrganizationData

dict() -> new empty dictionary

OrganizationDataWithinMembership

dict() -> new empty dictionary

PersonData

dict() -> new empty dictionary

MembershipData

dict() -> new empty dictionary

OutputLogHandler

Logging handler that forwards messages to an OutputHandler.

Module Contents

class pas.importer.types.EmailData[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)

id: str[source]
label: str[source]
email: str[source]
isDefault: bool[source]
thirdPartyId: str | None[source]
modified: str[source]
created: str[source]
class pas.importer.types.AddressData[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)

formattedAddress: str[source]
id: str[source]
label: str[source]
isDefault: bool[source]
organisationName: str[source]
organisationNameAddOn1: str[source]
organisationNameAddOn2: str[source]
addressLine1: str[source]
addressLine2: str[source]
street: str[source]
houseNumber: str[source]
dwellingNumber: str[source]
postOfficeBox: str[source]
swissZipCode: str[source]
swissZipCodeAddOn: str[source]
swissZipCodeId: str[source]
foreignZipCode: str[source]
locality: str[source]
town: str[source]
countryIdISO2: str[source]
countryName: str[source]
thirdPartyId: str | None[source]
modified: str[source]
created: str[source]
class pas.importer.types.PhoneNumberData[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)

id: str[source]
label: str[source]
phoneNumber: str[source]
phoneCategory: int[source]
otherPhoneCategory: str | None[source]
phoneCategoryText: str[source]
isDefault: bool[source]
thirdPartyId: str | None[source]
modified: str[source]
created: str[source]
class pas.importer.types.UrlData[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)

id: str[source]
label: str[source]
url: str | None[source]
isDefault: bool[source]
thirdPartyId: str | None[source]
modified: str[source]
created: str[source]
class pas.importer.types.OrganizationData[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)

created: str[source]
description: str[source]
htmlUrl: str[source]
id: str[source]
isActive: bool[source]
memberCount: int[source]
modified: str[source]
name: str[source]
organizationTypeTitle: Literal['Kommission', 'Fraktion', 'Kantonsrat', 'Sonstige'] | None[source]
primaryEmail: None[source]
status: int[source]
thirdPartyId: str | None[source]
url: str[source]
class pas.importer.types.OrganizationDataWithinMembership[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)

created: str[source]
description: str[source]
htmlUrl: str[source]
id: str[source]
isActive: bool[source]
memberCount: int[source]
modified: str[source]
name: str[source]
organizationTypeTitle: Literal['Kommission', 'Fraktion', 'Kantonsrat', 'Sonstige'] | None[source]
primaryEmail: EmailData | None[source]
status: int[source]
thirdPartyId: str | None[source]
url: str[source]
organizationType: int[source]
primaryAddress: AddressData | None[source]
primaryPhoneNumber: PhoneNumberData | None[source]
primaryUrl: UrlData | None[source]
statusDisplay: str[source]
tags: list[str][source]
type: str[source]
class pas.importer.types.PersonData[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)

created: str[source]
firstName: str[source]
fullName: str[source]
htmlUrl: str[source]
id: str[source]
isActive: bool[source]
modified: str[source]
officialName: str[source]
personTypeTitle: str | None[source]
primaryEmail: EmailData | None[source]
salutation: str[source]
tags: list[str][source]
thirdPartyId: str[source]
title: str[source]
url: str[source]
username: str | None[source]
class pas.importer.types.MembershipData[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)

department: str[source]
description: str[source]
emailReceptionType: str[source]
end: str | bool | None[source]
id: str[source]
isDefault: bool[source]
organization: OrganizationDataWithinMembership[source]
person: PersonData[source]
primaryAddress: AddressData | None[source]
primaryEmail: EmailData | None[source]
primaryPhoneNumber: PhoneNumberData | None[source]
primaryUrl: UrlData | None[source]
email: EmailData | None[source]
phoneNumber: PhoneNumberData | None[source]
address: AddressData | None[source]
urlField: UrlData | None[source]
role: str[source]
start: str | bool | None[source]
text: str[source]
thirdPartyId: str | None[source]
type: str[source]
typedId: str[source]
url: str[source]
class pas.importer.types.OutputLogHandler(output_handler: onegov.pas.log.OutputHandler)[source]

Bases: logging.Handler

Logging handler that forwards messages to an OutputHandler.

output_handler[source]
emit(record: logging.LogRecord) None[source]

Format and send log record to the output handler.