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.0a2.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.0a2-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: buoyant_config-1.0.0a2.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.0a2.tar.gz
Algorithm Hash digest
SHA256 e5cb3fa16d60f9099c5c456598ae008d0cb714c1b5719148028f31e502a5f937
MD5 1810b02d3f5005ab67e42cf39737f749
BLAKE2b-256 90d5387976ae73bf038dfcfac9cc85264dcff689ab8ed8f398c6178c704fa8ef

See more details on using hashes here.

File details

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

File metadata

  • Download URL: buoyant_config-1.0.0a2-py3-none-any.whl
  • Upload date:
  • Size: 5.8 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.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 9e5aad3fc7d1c39c4af6cbe2c8e034e18d9232bd2d913691bf960e6608b124cf
MD5 6f5172aa4f5f1392b0824523ab09a9ff
BLAKE2b-256 f0f078da4073edff961b3a05f56428c24be96b5131f5613d8bbbf2cbf9df5744

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