biometrics_tracker.model.importers module

class biometrics_tracker.model.importers.CSVImporter(queue_mgr: Queues, person: Person, filename: str, header_rows: int, use_prev_row_date: bool, indexed_fields: dict[int, str], completion_dest: Callable)

Bases: Thread

Implements the import process for a CSV file

run() None

Read the CSV file and save the resulting data to the database

Returns

None

class biometrics_tracker.model.importers.ImportSpec(id: str, nbr_of_header_rows: int, use_date_from_prev_row: bool, column_types: dict[int, str])

Bases: object

Used to persist the entry values from an instance of biometrics_tracker.gui.tk_gui.CSVImportFrame for reuse

class biometrics_tracker.model.importers.ImportSpecsCollection

Bases: object

Used to persist a number of instances of ImportSpec, keyed by the ImportSpec.id property

class biometrics_tracker.model.importers.ImportSpecsPickler(pickle_path: Path)

Bases: object

Provides pickling and unpickling for an instance of ImportSpecsCollection

retrieve() Optional[ImportSpecsCollection]

Unpickles and returns an instance of ImportSpecsCollection

Returns

biometrics_tracker.model.importers.ImportSpecsCollection

save(specs: ImportSpecsCollection)

Pickles the provided ImportSpecsCollection instance

Parameters

specs (biometrics_tracker.model.importers.ImportSpecsCollection) – the CSVImportFrame enty values to be preserved for later use

Returns

None