agency.data_import

Attributes

T

Ts

Functions

with_open(→ Callable[[StrOrBytesPath, *Ts], T])

v_(→ str | None)

cleaned(→ Callable[[str | None], T | None])

get_phone(→ str)

p(→ markupsafe.Markup)

br(→ markupsafe.Markup)

split_address_on_new_line(→ markupsafe.Markup)

get_address(→ markupsafe.Markup | None)

get_agency_portrait(→ markupsafe.Markup | None)

import_bs_agencies(→ dict[str, ...)

import_bs_persons(...)

import_bs_data(→ tuple[dict[str, ...)

get_plz_city(→ str | None)

get_web_address(→ str | None)

get_email(→ str | None)

check_skip(→ bool)

check_skip_people(→ bool)

agency_id_agency_lu(→ str)

Generates an agency id based on each organisation and sub organisation word

agency_id_person_lu(→ str)

Generates an agency id based on each organisation and sub organisation

import_lu_people(...)

import_lu_agencies(→ dict[str, ...)

import_lu_data(→ tuple[dict[str, ...)

parse_agencies(→ dict[str, str])

match_person_membership_title(→ None)

import_membership_titles(→ None)

Module Contents

agency.data_import.T[source]
agency.data_import.Ts[source]
agency.data_import.with_open(func: Callable[[CSVFile[DefaultRow], *Ts], T]) Callable[[StrOrBytesPath, *Ts], T][source]
agency.data_import.v_(string: str | None) str | None[source]
agency.data_import.cleaned(func: Callable[[str], T]) Callable[[str | None], T | None][source]
agency.data_import.get_phone(string: str) str[source]
agency.data_import.p(text: str) markupsafe.Markup[source]
agency.data_import.br(text: str) markupsafe.Markup[source]
agency.data_import.split_address_on_new_line(address: str, newline: bool = False) markupsafe.Markup[source]
agency.data_import.get_address(line: onegov.core.csv.DefaultRow) markupsafe.Markup | None[source]
agency.data_import.get_agency_portrait(line: onegov.core.csv.DefaultRow) markupsafe.Markup | None[source]
agency.data_import.import_bs_agencies(csvfile: onegov.core.csv.CSVFile[onegov.core.csv.DefaultRow], session: sqlalchemy.orm.Session, app: onegov.agency.app.AgencyApp) dict[str, onegov.agency.models.ExtendedAgency][source]
agency.data_import.import_bs_persons(csvfile: onegov.core.csv.CSVFile[onegov.core.csv.DefaultRow], agencies: Mapping[str, ExtendedAgency], session: sqlalchemy.orm.Session, app: onegov.agency.app.AgencyApp) list[onegov.agency.models.ExtendedPerson][source]
agency.data_import.import_bs_data(agency_file: _typeshed.StrOrBytesPath, person_file: _typeshed.StrOrBytesPath, request: onegov.agency.request.AgencyRequest, app: onegov.agency.app.AgencyApp) tuple[dict[str, onegov.agency.models.ExtendedAgency], list[onegov.agency.models.ExtendedPerson]][source]
agency.data_import.get_plz_city(plz: str | None, ort: str | None) str | None[source]
agency.data_import.get_web_address(internet_adresse: str) str | None[source]
agency.data_import.get_email(line: onegov.core.csv.DefaultRow) str | None[source]
agency.data_import.check_skip(line: onegov.core.csv.DefaultRow) bool[source]
agency.data_import.check_skip_people(line: onegov.core.csv.DefaultRow) bool[source]
agency.data_import.agency_id_agency_lu(words: Iterable[Any]) str[source]

Generates an agency id based on each organisation and sub organisation word

agency.data_import.agency_id_person_lu(line: onegov.core.csv.DefaultRow) str[source]

Generates an agency id based on each organisation and sub organisation name for a person.

agency.data_import.import_lu_people(csvfile: onegov.core.csv.CSVFile[onegov.core.csv.DefaultRow], agencies: Mapping[str, ExtendedAgency], session: sqlalchemy.orm.Session, app: onegov.agency.app.AgencyApp) list[onegov.agency.models.ExtendedPerson][source]
agency.data_import.import_lu_agencies(csvfile: onegov.core.csv.CSVFile[onegov.core.csv.DefaultRow], session: sqlalchemy.orm.Session, app: onegov.agency.app.AgencyApp) dict[str, onegov.agency.models.ExtendedAgency][source]
agency.data_import.import_lu_data(data_file: _typeshed.StrOrBytesPath, request: onegov.agency.request.AgencyRequest, app: onegov.agency.app.AgencyApp) tuple[dict[str, onegov.agency.models.ExtendedAgency], list[onegov.agency.models.ExtendedPerson]][source]
agency.data_import.parse_agencies(csvfile: onegov.core.csv.CSVFile[onegov.core.csv.DefaultRow]) dict[str, str][source]
agency.data_import.match_person_membership_title(csvfile: onegov.core.csv.CSVFile[onegov.core.csv.DefaultRow], agencies: Mapping[str, str], request: onegov.agency.request.AgencyRequest, app: onegov.agency.app.AgencyApp) None[source]
agency.data_import.import_membership_titles(agency_file: _typeshed.StrOrBytesPath, person_file: _typeshed.StrOrBytesPath, request: onegov.agency.request.AgencyRequest, app: onegov.agency.app.AgencyApp) None[source]