1
Fork 0
mirror of https://github.com/Steffo99/cfig.git synced 2024-11-21 15:34:20 +00:00
Configuration helper for Python
Find a file
2022-04-19 04:18:05 +02:00
.idea 💥 Many things 2022-04-19 03:03:13 +02:00
cfig 💥 yay more things 2022-04-19 04:09:05 +02:00
docs 💥 yay more things 2022-04-19 04:09:05 +02:00
.gitignore 🎉 First commit 2022-04-13 17:54:53 +02:00
cfig.iml 💥 yay more things 2022-04-19 04:09:05 +02:00
poetry.lock 💥 yay more things 2022-04-19 04:09:05 +02:00
pyproject.toml 💥 yay more things 2022-04-19 04:09:05 +02:00
README.md 🗒️ Add additional example to README.md 2022-04-19 04:18:05 +02:00

cfig

A configuration manager for Python

import cfig

config = cfig.Configuration()

@config.required()
def SECRET_KEY(val: str) -> str:
    """Secret string used to manage tokens."""
    return val

if __name__ == "__main__":
    config.cli()
from .mycfig import SECRET_KEY

print(f"My SECRET_KEY is: {SECRET_KEY})
$ python -m cfig.sample
=== Configuration ===

SECRET_KEY    → Required, but not set.
Secret string used to manage HTTP session tokens.
 [**Documentation**](https://cfig.readthedocs.io/) | [**PyPI**](https://pypi.org/project/cfig/)