election_day.formats.imports.vote.wabstic

Attributes

WABSTIC_VOTE_HEADERS_SG_GESCHAEFTE

WABSTIC_VOTE_HEADERS_SG_GEMEINDEN

Functions

parse_domain(→ str | None)

line_is_relevant(→ bool)

import_vote_wabstic(...)

Tries to import the given CSV files from a WabstiCExport.

Module Contents

election_day.formats.imports.vote.wabstic.WABSTIC_VOTE_HEADERS_SG_GESCHAEFTE = ('art', 'sortwahlkreis', 'sortgeschaeft')[source]
election_day.formats.imports.vote.wabstic.WABSTIC_VOTE_HEADERS_SG_GEMEINDEN = ('art', 'sortwahlkreis', 'sortgeschaeft', 'bfsnrgemeinde', 'sperrung', 'stimmberechtigte',...[source]
election_day.formats.imports.vote.wabstic.parse_domain(domain: str) str | None[source]
election_day.formats.imports.vote.wabstic.line_is_relevant(line: onegov.core.csv.DefaultRow, domain: str, district: str, number: str) bool[source]
election_day.formats.imports.vote.wabstic.import_vote_wabstic(vote: onegov.election_day.models.Vote, principal: Canton | Municipality, number: str, district: str, file_sg_geschaefte: IO[bytes], mimetype_sg_geschaefte: str, file_sg_gemeinden: IO[bytes], mimetype_sg_gemeinden: str) list[onegov.election_day.formats.imports.common.FileImportError][source]

Tries to import the given CSV files from a WabstiCExport.

This function is typically called automatically every few minutes during an election day - we use bulk inserts to speed up the import.

Returns:

A list containing errors.