CLI Config

Merge your configs (optionally nested with dots) and set parameters from command line.

PyPI version PythonVersion License

Ruff_logo Black_logo

Ruff Flake8 Pydocstyle MyPy PyLint

Tests Coverage Documentation Status

Access to a default config file in your project (configs are merged from left to right):

# main.py
from cliconfig import make_config, show_config

config = make_config('default1.yaml', 'default2.yaml')  # it's a dict

Then launch your script with additional config(s) file(s) and parameters:

python main.py --config exp1.yaml,exp2.yaml --param1 1 --subconfig.param2 'foo'