add helper for setting the config dynamically
This commit is contained in:
parent
1273b0ca61
commit
811303fcb1
1 changed files with 19 additions and 0 deletions
19
my/cfg.py
Normal file
19
my/cfg.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
"""
|
||||
A helper to allow configuring the modules dynamically.
|
||||
|
||||
Usage:
|
||||
|
||||
from my.cfg import config
|
||||
|
||||
After that, you can set config attributes:
|
||||
|
||||
from types import SimpleNamespace
|
||||
config.twitter = SimpleNamespace(
|
||||
export_path='/path/to/twitter/exports',
|
||||
)
|
||||
"""
|
||||
# TODO later, If I have config stubs that might be unnecessary too..
|
||||
|
||||
from . import init
|
||||
|
||||
import my.config as config
|
Loading…
Add table
Reference in a new issue