confini

Parse and merge multiple ini files in python3
git clone git://git.defalsify.org/python-confini.git
Log | Files | Refs | README | LICENSE

commit 2cd2ad511ad630da24b35f1e9c029710d8a08329
parent ec9f3f61aacac58352b011d1a288741d86eb9489
Author: nolash <dev@holbrook.no>
Date:   Sat, 22 Aug 2020 10:33:05 +0200

Add parse script

Diffstat:
Mconfini/__init__.py | 14--------------
Mconfini/config.py | 10----------
Ascripts/parse.py | 11+++++++++++
Msetup.py | 2+-
4 files changed, 12 insertions(+), 25 deletions(-)

diff --git a/confini/__init__.py b/confini/__init__.py @@ -1,15 +1 @@ from confini.config import Config, set_current, config_from_environment - - -# TODO workaround for global sempo code smell, can't get around it unless manipulate attributes in the package itself -#SENTRY_SERVER_DSN = None -#ETH_CHAIN_ID = 42 -#ETH_GAS_PRICE = 1000000000 -#ETH_GAS_LIMIT = 60000 -#ETH_CHECK_TRANSACTION_RETRIES = 0 -#ETH_CHECK_TRANSACTION_RETRIES_TIME_LIMIT = 0 -#ETH_CHECK_TRANSACTION_BASE_TIME = 0 -#REDIS_URL = 'redis://' -#ETH_HTTP_PROVIDER = 'http://localhost:8545' -#ETH_DATABASE_URI = 'postgresql://postgres:postgres@localhost:8545/eth_worker' -#SYNCRONOUS_TASK_TIMEOUT = 1 diff --git a/confini/config.py b/confini/config.py @@ -129,13 +129,3 @@ def config_dir_from_environment(): return os.environ.get('CIC_CONFIG_DIR') -if __name__ == "__main__": - if len(sys.argv) < 2: - sys.stderr.write('usage: config.py <config_dir>') - sys.exit(1) - c = Config(sys.argv[1]) - c.process() - print(repr(c)) - print(c) - - diff --git a/scripts/parse.py b/scripts/parse.py @@ -0,0 +1,11 @@ +import sys + +from confini import Config + +if __name__ == "__main__": + if len(sys.argv) < 2: + sys.stderr.write('usage: config.py <config_dir>') + sys.exit(1) + c = Config(sys.argv[1]) + c.process() + print(c) diff --git a/setup.py b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup setup( name='confini', - version='0.0.1', + version='0.0.3', description='Parse, verify and merge all ini files in a single directory', author='Louis Holbrook', author_email='dev@holbrook.no',