From 811303fcb1b8f473d8d914985b55858a95720c0f Mon Sep 17 00:00:00 2001 From: Dima Gerasimov Date: Tue, 14 Apr 2020 20:14:58 +0100 Subject: [PATCH] add helper for setting the config dynamically --- my/cfg.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 my/cfg.py diff --git a/my/cfg.py b/my/cfg.py new file mode 100644 index 0000000..f339b98 --- /dev/null +++ b/my/cfg.py @@ -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