mirror of
https://github.com/dtomlinson91/panaetius.git
synced 2025-12-22 04:55:44 +00:00
chore: add simple env script example to README
This commit is contained in:
12
README.md
12
README.md
@@ -83,6 +83,8 @@ tembo.cli.CONFIG
|
|||||||
|
|
||||||
### Script
|
### Script
|
||||||
|
|
||||||
|
#### with config file
|
||||||
|
|
||||||
Create `./config/config.yml` in the same directory as the script.
|
Create `./config/config.yml` in the same directory as the script.
|
||||||
|
|
||||||
In the script initialise a `CONFIG` object:
|
In the script initialise a `CONFIG` object:
|
||||||
@@ -99,6 +101,16 @@ CONFIG = panaetius.Config(
|
|||||||
|
|
||||||
Set variables in the same way as the module above.
|
Set variables in the same way as the module above.
|
||||||
|
|
||||||
|
#### with env vars only
|
||||||
|
|
||||||
|
```python
|
||||||
|
import panaetius
|
||||||
|
|
||||||
|
CONFIG = panaetius.Config("mart")
|
||||||
|
panaetius.set_config(CONFIG, "username")
|
||||||
|
panaetius.set_config(CONFIG, "password")
|
||||||
|
```
|
||||||
|
|
||||||
#### quickstart logging
|
#### quickstart logging
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
|||||||
Reference in New Issue
Block a user