CreateExportPersons package

Submodules

LOGS_solutions.CreateExportEntities.CreateExportPersons.PersonManager module

class LOGS_solutions.CreateExportEntities.CreateExportPersons.PersonManager.PersonManager(logs, source_path=None, target_path=None, export_format='.csv')[source]

Bases: object

This class enables the creation of persons in a LOGS instance using a CSV file, or the export of persons from a LOGS instance into a CSV file.

check_role(role, role_list)[source]

Retrieves the LOGS role object that matches the given role name, if it exists.

Parameters:
  • role (str) – The name of the role to match.

  • role_list (List) – List of all roles in the LOGS instance.

Return type:

Role

Returns:

The LOGS Role object corresponding to the specified role name.

create_persons()[source]

Creates a person by the given csv-file.

export_persons()[source]

Export persons based on the specified export format.

export_persons_csv()[source]

Export Persons from LOGS.

export_persons_excel()[source]

Export Persons from LOGS to an Excel file.

LOGS_solutions.CreateExportEntities.CreateExportPersons.main module

LOGS_solutions.CreateExportEntities.CreateExportPersons.main.main(args)[source]

Main function to create or export persons in a LOGS instance. Important: This classes uses absolute paths. To obtain the correct absolute path, you must ensure that the relative path is correct in relation to the directory in which the script is executed. If you are not sure, use the absolute path for source_path and target_path

LOGS_solutions.CreateExportEntities.CreateExportPersons.main.parse_args()[source]

Parse command line arguments.

LOGS_solutions.CreateExportEntities.CreateExportPersons.main.valid_format(value)[source]

Validate the export format.

LOGS_solutions.CreateExportEntities.CreateExportPersons.main.valid_source_path(source_path)[source]

Validates the given source paths.

Parameters:

source_path – The source path to validate.

Return type:

Path

Returns:

The absolute path for the source.

LOGS_solutions.CreateExportEntities.CreateExportPersons.main.valid_target_path(target_path)[source]

Validates the given paths.

Parameters:

target_path – The target path to validate.

Return type:

Path

Returns:

The absolute path for the target.

LOGS_solutions.CreateExportEntities.CreateExportPersons.main.validate_format(args)[source]

Validate the export format and ensure it matches the target paths.

Module contents