mirror of
https://github.com/Steffo99/cfig.git
synced 2024-11-21 07:24:21 +00:00
Configuration helper for Python
67111c9c24
Bumps [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme) from 1.1.1 to 1.2.0. - [Release notes](https://github.com/readthedocs/sphinx_rtd_theme/releases) - [Changelog](https://github.com/readthedocs/sphinx_rtd_theme/blob/master/docs/changelog.rst) - [Commits](https://github.com/readthedocs/sphinx_rtd_theme/compare/1.1.1...1.2.0) --- updated-dependencies: - dependency-name: sphinx-rtd-theme dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> |
||
---|---|---|
.github | ||
.idea | ||
.vscode | ||
cfig | ||
docs | ||
.gitignore | ||
.readthedocs.yml | ||
cfig.iml | ||
LICENSE.txt | ||
poetry.lock | ||
pyproject.toml | ||
README.md |
cfig
A configuration manager for Python
[**Example**](https://github.com/Steffo99/cfig/tree/main/cfig/sample) | [**Documentation**](https://cfig.readthedocs.io/) | [**PyPI**](https://pypi.org/project/cfig/)
import cfig
config = cfig.Configuration()
@config.required()
def SECRET_KEY(val: str) -> str:
"""Secret string used to manage HTTP session tokens."""
return val
if __name__ == "__main__":
config.cli()
from mypackage.mycfig import SECRET_KEY
print(f"My SECRET_KEY is: {SECRET_KEY}")
$ python -m mypackage.mycfig
===== Configuration =====
SECRET_KEY → Required, but not set.
Secret string used to manage HTTP session tokens.
===== End =====