Local Module¶
This section documents the local components of the Nextmv Python SDK - Local experience.
local
¶
Local module to hold convenience functions used in the local package.
| FUNCTION | DESCRIPTION |
|---|---|
calculate_files_size |
Function to calculate the total size of files in a directory. |
| ATTRIBUTE | DESCRIPTION |
|---|---|
OUTPUT_KEY |
Output key constant used for identifying output in the run output.
TYPE:
|
LOGS_KEY |
Logs key constant used for identifying logs in the run output.
TYPE:
|
LOGS_FILE |
Constant used for identifying the file used for logging.
TYPE:
|
DEFAULT_OUTPUT_JSON_FILE |
Constant for the default output JSON file name.
TYPE:
|
RUNS_KEY |
Runs key constant used for identifying the runs directory in the nextmv location.
TYPE:
|
NEXTMV_DIR |
Constant for the Nextmv directory name.
TYPE:
|
DEFAULT_INPUT_JSON_FILE |
Constant for the default input JSON file name.
TYPE:
|
DEFAULT_INPUT_JSON_FILE
module-attribute
¶
Constant for the default input JSON file name.
DEFAULT_INPUT_TEXT_FILE
module-attribute
¶
Constant for the default input text file name.
DEFAULT_OUTPUT_JSON_FILE
module-attribute
¶
Constant for the default output JSON file name.
LOGS_FILE
module-attribute
¶
Constant used for identifying the file used for logging.
LOGS_KEY
module-attribute
¶
Logs key constant used for identifying logs in the run output.
OUTPUT_KEY
module-attribute
¶
Output key constant used for identifying output in the run output.
REGISTRY_FILE
module-attribute
¶
Constant for the local registry file name. This file stores information about the apps on the local machine. It is located in the Nextmv directory in the user's home directory.
RUNS_KEY
module-attribute
¶
Runs key constant used for identifying the runs directory in the nextmv location.
calculate_files_size
¶
calculate_files_size(
run_dir: str,
run_id: str,
dir_path: str,
metadata_key: str,
) -> None
Calculates the total size of the files in a directory, in bytes.
The calculated size is stored in the run information metadata under the specified key.
| PARAMETER | DESCRIPTION |
|---|---|
|
The path to the run directory.
TYPE:
|
|
The ID of the run.
TYPE:
|
|
The path to the directory whose size is to be calculated.
TYPE:
|
|
The key under which to store the calculated size in the run information metadata.
TYPE:
|