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, ...)

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.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]