No project description provided
Project description
Acit4040 Config Helper
Config Helper provides multiple ways of getting configuration data from environment variables and secrets from GCP Secret Manager..
Environment Variables
As of version 0.1.1, the following methods are supported:
- get_envvar_int(envvar_name: str, default_value: int | None = None) -> int
- Reads an integer from the environment variable in
envvar_name
. - Supports fallback values with
default_value
.
- Reads an integer from the environment variable in
- get_envvar_path(envvar_name: str, check_exists: bool = True) -> Path
- Reads a path from the environment variable in
envvar_name
. - Supports checking if the path exists with
check_exists
. - Does not support fallback values.
- Reads a path from the environment variable in
- get_envvar_str(envvar_name: str, default_value: str | None = None) -> str
- Reads a string from the environment variable in
envvar_name
. - Supports fallback values with
default_value
.
- Reads a string from the environment variable in
GCP Secret Manager
As of version 0.1.1, the following methods are supported:
- get_secret(env_var_name: str, fallback_env_var_name: t.Optional[str]) -> str
- Reads a text secret from GCP Secret Manager.
- Supports fallback values with
fallback_env_var_name
.
- get_secret_file(env_var_name: str, output_file: Path, fallback_env_var_name: t.Optional[str]) -> Path
- Reads a binary secret/a file from GCP Secret Manager and writes it to
output_file
. - Supports fallback values with
fallback_env_var_name
.
- Reads a binary secret/a file from GCP Secret Manager and writes it to
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for acit4040_config_helper-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3bc702daf611b5729a2b0e7291d39e1f32ba57ed2b91c8fa1d64974810e2e8f |
|
MD5 | 8ce320da52f15b9235e8067cd505869f |
|
BLAKE2b-256 | 18fa706cfeab6d8f270e21bef322b37708d65e9f89b8a725f955b90b544fa36c |
Close
Hashes for acit4040_config_helper-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c98fb63afd0a97cb66cfdf1089f4be7b3de66763143aa33136e99c96c1375979 |
|
MD5 | 3b90765d299d485424a40705b479d36d |
|
BLAKE2b-256 | 35031a7774a93f6452d9498c5d1d366e27f1e26bce0b2f3d5b79c80bbd4fa2cd |