sconf

raw JSON →
0.2.5 verified Sat May 09 auth: no python

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
error ImportError: cannot import name 'Config' from 'sconf'
cause Trying to import a non-existent class 'Config'.
fix
Use: from sconf import Sconf
error sconf.Sconf object is not subscriptable
cause Trying to index a Sconf instance directly with integer index.
fix
Use string keys: config['key']
gotcha Accessing a missing key returns None silently, no KeyError.
fix Use .get() or check key existence with `in`.
gotcha The 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.