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.0a1.tar.gz (3.6 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.0a1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: buoyant_config-1.0.0a1.tar.gz
  • Upload date:
  • Size: 3.6 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.0a1.tar.gz
Algorithm Hash digest
SHA256 35dd56337a8be72c866f3a1129e40186480c038184181227cd4d6c3131a1d6d5
MD5 09bcfad3c6f7a8d64646daebe2efff53
BLAKE2b-256 19ef3b9dd13912e16db3a3db4e8a89e6b5059621c6f613078c631febc57209d0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: buoyant_config-1.0.0a1-py3-none-any.whl
  • Upload date:
  • Size: 5.9 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.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 1a4b6077e10248e18de89efdf88e1567a63fd84d9b9fb2e16dec253492f722b4
MD5 32d656cec2b1e6b889d859b03d8b8921
BLAKE2b-256 63fe0162f99815513d0f176534206364d627144dccbc0167bb571c3290761958

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