Skip to main content

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.
  • 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.
  • 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.

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.

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

acit4040_config_helper-0.1.3.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

acit4040_config_helper-0.1.3-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file acit4040_config_helper-0.1.3.tar.gz.

File metadata

  • Download URL: acit4040_config_helper-0.1.3.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.6 Windows/10

File hashes

Hashes for acit4040_config_helper-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e3bc702daf611b5729a2b0e7291d39e1f32ba57ed2b91c8fa1d64974810e2e8f
MD5 8ce320da52f15b9235e8067cd505869f
BLAKE2b-256 18fa706cfeab6d8f270e21bef322b37708d65e9f89b8a725f955b90b544fa36c

See more details on using hashes here.

File details

Details for the file acit4040_config_helper-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for acit4040_config_helper-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c98fb63afd0a97cb66cfdf1089f4be7b3de66763143aa33136e99c96c1375979
MD5 3b90765d299d485424a40705b479d36d
BLAKE2b-256 35031a7774a93f6452d9498c5d1d366e27f1e26bce0b2f3d5b79c80bbd4fa2cd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page