Skip to main content

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_)

Metadata

Release files for moat-lib-config 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for moat-lib-config 0.2.5
File Size Uploaded Provenance Actions
moat_lib_config-0.2.5.tar.gz 14.2 kB Without provenance Details for moat_lib_config-0.2.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for moat-lib-config 0.2.5
File Interpreter ABI Platform Actions
moat_lib_config-0.2.5-py3-none-any.whl Python 3 none any Details for moat_lib_config-0.2.5-py3-none-any.whl

Total release size: 27.5 kB

Release files / moat_lib_config-0.2.5.tar.gz

Download URL moat_lib_config-0.2.5.tar.gz
Size 14.2 kB
Tags Source
SHA-256 checksum
How to use checksums
28bedd0894b5312ca70b23cef8f237a305a9791de34d8f56f3bc5bae65a34c8a
BLAKE2b-256 checksum
How to use checksums
688f2d457791128300190e7af3bdfa8b77500ee2da9c4c9090c2cd5f7c3d4165
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / moat_lib_config-0.2.5-py3-none-any.whl

Download URL moat_lib_config-0.2.5-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1bf111f14af0e277063d89741d686d8440e249f2a3780673355d2fb8b2a0418a
BLAKE2b-256 checksum
How to use checksums
f70d2318f2002155fde113d6075c6f05ff9cb0c0402b3a37d267647f7982fd32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for moat-lib-config 0.2.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page