1
Fork 0
mirror of https://github.com/Steffo99/cfig.git synced 2024-10-16 14:27:38 +00:00
cfig/README.md
2024-05-14 03:22:57 +02:00

817 B

cfig

Configuration helper for Python

PyPI

Documentation

Example

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