A modular and typed yaml configuration system for python with easy secret support
Project description
A modular and typed yaml configuration system for python with easy secret support
Install
pip install buoyant.config
or
uv add buoyant.config
Example Usage
from typing import Annotated, Literal
from buoyant.config import ModularConfig
class ConfigBase(ModularConfig):
CONFIG_PATH = "settings.test.yaml"
CONFIG_PATH_FROM_ENV_VAR = "SETTINGS_PATH"
class LoggingConfig(ConfigBase):
CONFIG_SECTION = "logging"
level: Literal["info", "warning", "error"]
from buoyant.config.annotations.gsm import gsm_secret
class BackendConfig(ConfigBase):
CONFIG_SECTION = "server"
host: str
api_key: Annotated[str, gsm_secret(project="buoyant-open-projects")]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
buoyant_config-0.3.0.tar.gz
(2.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file buoyant_config-0.3.0.tar.gz.
File metadata
- Download URL: buoyant_config-0.3.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"11","id":"bullseye","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5b8652521dee70f0a27217a069e3898355695812a3d82680ee6149d92e3bd06
|
|
| MD5 |
bc69bb25fe1407c286d65506d5be98db
|
|
| BLAKE2b-256 |
cd9e6ad36bc4f1619739eca4f9881c3bec788b334d2bafac84d543a5113ddae7
|
File details
Details for the file buoyant_config-0.3.0-py3-none-any.whl.
File metadata
- Download URL: buoyant_config-0.3.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"11","id":"bullseye","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67570bce3496394c5865eafcdd8d4641cb259da6ff84f980cf3b2d05e2d53b7b
|
|
| MD5 |
f15eed83b7f5cb52e830e27f1c82e755
|
|
| BLAKE2b-256 |
2aec295fd00d7e93339e1e79177ff3891de2c1777269c2c9a7372a5f7ebce68f
|