1
Fork 0
mirror of https://github.com/Steffo99/cfig.git synced 2024-11-23 16:34:20 +00:00

Remove example from README

This commit is contained in:
Steffo 2024-05-14 03:25:33 +02:00
parent eaa3aad5e7
commit dc5779f1bc
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0

View file

@ -13,35 +13,3 @@ Configuration helper for Python
[![PyPI](https://img.shields.io/pypi/v/cfig)](https://pypi.org/project/cfig)
[![Documentation](https://img.shields.io/readthedocs/cfig)](https://cfig.readthedocs.io/en/latest/)
## Example
```python
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()
```
```python
from mypackage.mycfig import SECRET_KEY
print(f"My SECRET_KEY is: {SECRET_KEY}")
```
```console
$ python -m mypackage.mycfig
===== Configuration =====
SECRET_KEY → Required, but not set.
Secret string used to manage HTTP session tokens.
===== End =====
```