mirror of
https://github.com/Steffo99/cfig.git
synced 2024-11-24 08:54:20 +00:00
Remove example from README
This commit is contained in:
parent
eaa3aad5e7
commit
dc5779f1bc
1 changed files with 0 additions and 32 deletions
32
README.md
32
README.md
|
@ -13,35 +13,3 @@ Configuration helper for Python
|
||||||
[![PyPI](https://img.shields.io/pypi/v/cfig)](https://pypi.org/project/cfig)
|
[![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/)
|
[![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 =====
|
|
||||||
```
|
|
||||||
|
|
Loading…
Reference in a new issue