config
CLI-wide config variables.
get_config_folder_path(tmp=False)
Gets the config folder path on current machine.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tmp |
bool
|
A true/false flag that determines whether function should return temporary folder or base folder. |
False
|
Raises:
Type | Description |
---|---|
Exception
|
If the platform is not linux, darwin (macos) or windows. |
Returns:
Type | Description |
---|---|
str
|
The config folder path, or temporary folder path inside config folder. |
Source code in dapla_team_cli/config.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
|
get_version_file_content()
Reads a txt-file, fetching a stored timestamp.
:return The content in the txt file.
Source code in dapla_team_cli/config.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
|
has_recently_checked_version()
Checks if the current version should be controlled by accessing a text file.
Inside the file a timestamp for the last performed version check is stored.
The function takes use of the constant TIMESTAMP_DIFFERENCE. This is the time threshold in milliseconds before a new check should be performed.
:return: A boolean variable. False if a check should be performed, or True if not.
Source code in dapla_team_cli/config.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
version_cb(value)
Prints the current version of dapla-team-cli.
Source code in dapla_team_cli/config.py
65 66 67 68 69 |
|
warn_if_newer_version()
Prints a warning if there exists a newer version on PyPi.
Source code in dapla_team_cli/config.py
118 119 120 121 122 123 124 125 126 127 128 129 130 |
|