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.2.0.tar.gz (10.4 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.2.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: moat_lib_config-0.2.0.tar.gz
  • Upload date:
  • Size: 10.4 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.2.0.tar.gz
Algorithm Hash digest
SHA256 f85c28280c7a02a9aac833640e7891da1268f5cc2a440565e1a52b243ab40207
MD5 e71d3fd3e30e604d304b697903585a68
BLAKE2b-256 0e2230b714478d7175a79d032f8ab5abd2001dba16e57b090d729851388a328a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for moat_lib_config-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7410b1e41670d06b845c8fe61664b2d37b566fc3440f3c98579685006a23ab59
MD5 3d63fa8282212c49e58aa4bda701c6c1
BLAKE2b-256 7dd7b178964738f7383f8d87eb4e624eaea5c33a0dfd3d1d9ac910d323c2ce6f

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