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.6

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.6
File Size Uploaded Provenance Actions
moat_lib_config-0.2.6.tar.gz 14.2 kB Without provenance Details for moat_lib_config-0.2.6.tar.gz

Built distribution (wheel)

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

Total release size: 27.5 kB

Release files / moat_lib_config-0.2.6.tar.gz

Download URL moat_lib_config-0.2.6.tar.gz
Size 14.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d10999aab34f32c79bf9ca39fdd5780e507cfa806853719348c07314df085d2d
BLAKE2b-256 checksum
How to use checksums
c9d87d7fcd69607917e33edfa1a241a169a64d25665aa758f9ef3732f96e7820
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.6-py3-none-any.whl

Download URL moat_lib_config-0.2.6-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a8595e14a3bfe94f403dd90ef7c7f095869c60c83126812b5fca3302393aff7
BLAKE2b-256 checksum
How to use checksums
52eae882f23f9b86d0a2e56334b820ef01b4c26557ea34728da18005dd76285e
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.6

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