Skip to main content

Configuration management for MoaT applications

Project description

Configuration management

% start main % start synopsis

This module provides infrastructure for loading, merging, and managing configuration data from multiple sources. It includes:

  • Multi-source configuration loading (files, environment, programmatic)
  • Hierarchical configuration with automatic merging
  • Context-aware configuration access
  • Configuration inheritance with $base references
  • Lazy loading of module-specific configurations

% end synopsis

% end main

Usage

from moat.lib.config import CFG

# Initial setup (once, at program startup)
CFG(name="myapp")
# loads `/etc/myapp.yaml` (and others)

# Access configuration data
print(CFG.database.host)

Configuration Sources

The CfgStore class combines configuration from multiple sources (in order of precedence):

  • Command-line arguments (via mod method)
  • Preloaded configuration (passed to constructor)
  • Environment variables (in CfgStore.env)
  • Explicitly added config files (via add method)
  • Default config files (from standard paths)
  • Static module configurations (loaded via with_)

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

moat_lib_config-0.1.2.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

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

moat_lib_config-0.1.2-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file moat_lib_config-0.1.2.tar.gz.

File metadata

  • Download URL: moat_lib_config-0.1.2.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for moat_lib_config-0.1.2.tar.gz
Algorithm Hash digest
SHA256 08b6ae296e01677bf51bd424623451227c9765a42ac5f2e2a7e58479bdae882d
MD5 b416e55a48f00cdcd16c0f09c6db45ca
BLAKE2b-256 d5e1cc2d557d6534c38897ad194e76ee43da2819e6ee1667b94e543829538b69

See more details on using hashes here.

File details

Details for the file moat_lib_config-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for moat_lib_config-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b4dfb247c91c099e7d6ac95424f5f8018b92f8e060ab9c29dfcd402850142f7a
MD5 b75d8a052badba685d12fcbc598eceb7
BLAKE2b-256 81adda632e6db5b150559f0feac1987f23f7d6c4aa7726353f416168c4bcc3e8

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