CreateExportInventories package
Submodules
LOGS_solutions.CreateExportEntities.CreateExportInventories.InventoryManager module
- class LOGS_solutions.CreateExportEntities.CreateExportInventories.InventoryManager.InventoryManager(logs, source_path=None, target_path=None, export_format='.csv', log_path=None)[source]
Bases:
objectThis class enables the creation of inventories in a LOGS instance using a CSV file, or the export of inventories from a LOGS instance into a CSV file.
- check_customtypes(inventories_data)[source]
Removes rows whose Custom Type ID does not exist in the LOGS instance. :type inventories_data: :param inventories_data: DataFrame containing inventory data. :rtype:
DataFrame:return: DataFrame with invalid custom types removed.
- check_projects(inventories_data)[source]
Removes rows whose project IDs do not exist in the LOGS instance. :type inventories_data: :param inventories_data: DataFrame containing inventory data. :rtype:
DataFrame:return: DataFrame with invalid projects removed.
- create_inventories()[source]
Creates inventories in the LOGS instance based on the data from the source CSV or Excel file. :rtype:
None:return: None
- export_inventories()[source]
Exports inventories from the LOGS instance to a CSV or Excel file at the target path. :rtype:
None:return: None
- export_inventories_csv()[source]
Exports inventories from the LOGS instance to a CSV file. :rtype:
None:return: None
- export_inventories_excel()[source]
Exports inventories from the LOGS instance to an Excel file. :rtype:
None:return: None
- export_inventories_json()[source]
Exports inventories from the LOGS instance to JSON files. :rtype:
None:return: None
LOGS_solutions.CreateExportEntities.CreateExportInventories.main module
- LOGS_solutions.CreateExportEntities.CreateExportInventories.main.main(args)[source]
Main function to create or export inventories 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 Create Inventories: Be aware that the csv/excel files must have the header
- LOGS_solutions.CreateExportEntities.CreateExportInventories.main.parse_args()[source]
Parse command line arguments.
- LOGS_solutions.CreateExportEntities.CreateExportInventories.main.valid_format(value)[source]
Validate the export format.
- LOGS_solutions.CreateExportEntities.CreateExportInventories.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.