mirror of
https://github.com/dtomlinson91/panaetius.git
synced 2025-12-22 04:55:44 +00:00
updating documentation in library.py
This commit is contained in:
@@ -58,22 +58,19 @@ def set_config(
|
|||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
`config.toml` has the following attribute set:
|
`config.toml` has the following attribute set::
|
||||||
```
|
|
||||||
[package.users]
|
[package.users]
|
||||||
auth = ['user1', 'user2']
|
auth = ['user1', 'user2']
|
||||||
```
|
|
||||||
|
|
||||||
If set as an environment variable you can pass this list as a string
|
If set as an environment variable you can pass this list as a string
|
||||||
and set check=list:
|
and set check=list::
|
||||||
|
|
||||||
Environment variable:
|
Environment variable:
|
||||||
PACKAGE_USERS_AUTH = "['user1', 'user2']"
|
PACKAGE_USERS_AUTH = "['user1', 'user2']"
|
||||||
|
|
||||||
Usage in code:
|
Usage in code::
|
||||||
```python
|
|
||||||
set_config(CONFIG, 'users.auth', check=list)
|
set_config(CONFIG, 'users.auth', check=list)
|
||||||
```
|
|
||||||
"""
|
"""
|
||||||
config_var = key.lower().replace('.', '_')
|
config_var = key.lower().replace('.', '_')
|
||||||
if check is None:
|
if check is None:
|
||||||
|
|||||||
Reference in New Issue
Block a user