Registry / serialization / sconf
library0.2.5pypypi✓ verified 80d ago

Simple config management supporting CLI modification. Current version 0.2.5. Allows nested config via dict-like objects and CLI overrides. Lightweight, no dependencies beyond Python 3.6+. Low release cadence (last release 2021).

pip install sconf
INSTALL
IMPORT
SIG · SCONF
S
sconf
serializationpythonv0.2.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Config
from sconf import Config
from sconf import Sconf
config
from sconf import config
from sconf import Sconf
dump_args
from sconf import dump_args
from sconf import Sconf

Create a config from a dict and access nested keys with dot notation.

from sconf import Sconf config = Sconf({'a': 1, 'b': {'c': 2}}) print(config['a']) # 1 print(config['b.c']) # 2 # CLI override example: python script.py --a 10
sconf --version
Debug
Known issues
gotchaAccessing a missing key returns None silently, no KeyError.
fix
Use .get() or check key existence with `in`.
affects: all
gotchaThe library uses eval() internally for CLI overrides, which can execute arbitrary code if user input is not sanitized.
fix
Do not expose CLI override functionality to untrusted input.
affects: all
Upgrade
Version history
0.2.5latest on PyPI · released Sep 20, 2021
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
sconf — pip install sconf · libregistry