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

🗒️ Improve example in README

This commit is contained in:
Steffo 2022-04-19 04:19:23 +02:00
parent 3cee5ff825
commit 207665a185
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -2,6 +2,10 @@
A configuration manager for Python
\[ [**Documentation**](https://cfig.readthedocs.io/) | [**PyPI**](https://pypi.org/project/cfig/) \]
## Example
```python
import cfig
@ -17,17 +21,15 @@ if __name__ == "__main__":
```
```python
from .mycfig import SECRET_KEY
from mypackage.mycfig import SECRET_KEY
print(f"My SECRET_KEY is: {SECRET_KEY}")
```
```console
$ python -m cfig.sample
$ python -m mypackage.mycfig
=== 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/) \]