Skip to main content

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

Define your configuration in a modular fashion:

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")]

Use it easily:

config = BackendConfig.load()
config.host

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

buoyant_config-1.0.0a0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

buoyant_config-1.0.0a0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file buoyant_config-1.0.0a0.tar.gz.

File metadata

  • Download URL: buoyant_config-1.0.0a0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for buoyant_config-1.0.0a0.tar.gz
Algorithm Hash digest
SHA256 7255cc967f000f092fcd8d55672df3a86320df1899073b23259d3a35e19e7ab5
MD5 07d258f22b2ed62c23a6413ce6b8ba6a
BLAKE2b-256 57a1039a4d8d06e601af3cd266d01565e814d0785296772763eb3481cf0f0e18

See more details on using hashes here.

File details

Details for the file buoyant_config-1.0.0a0-py3-none-any.whl.

File metadata

  • Download URL: buoyant_config-1.0.0a0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for buoyant_config-1.0.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 1607c2e23e9b6e932e64612de15d44218fcc43de275559f3b9f17648266c6f9e
MD5 c773e98ba3aac21cd31cb6dc02ef8847
BLAKE2b-256 608113baa380f449820864553431a86e639965100dc522d81dadec28af31364b

See more details on using hashes here.

Supported by

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