1
Fork 0
mirror of https://github.com/Steffo99/cfig.git synced 2024-10-16 14:27:38 +00:00
Configuration helper for Python
Find a file
2022-04-21 19:14:09 +02:00
.github 🔨 Configure dependabot 2022-04-20 04:25:11 +02:00
.idea 💥 Yay more changes 2022-04-20 04:15:10 +02:00
cfig 💥 Yay more changes 2022-04-20 04:15:10 +02:00
docs 🗒️ Complete documentation? 2022-04-21 19:14:09 +02:00
.gitignore 🎉 First commit 2022-04-13 17:54:53 +02:00
.readthedocs.yml 🔨 Fix readthedocs yml file again 2022-04-19 04:39:37 +02:00
cfig.iml 💥 Yay more changes 2022-04-20 04:15:10 +02:00
LICENSE Create LICENSE.md 2022-04-20 04:30:13 +02:00
poetry.lock 🗒️ Complete documentation? 2022-04-21 19:14:09 +02:00
pyproject.toml 🗒️ Complete documentation? 2022-04-21 19:14:09 +02:00
README.md 💥 Yay more changes 2022-04-20 04:15:10 +02:00

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 =====