config selector
Project description
config selector
>>> import os
>>> SELFDIR = os.path.dirname(os.path.abspath('.')) # or : SELFDIR = os.path.dirname(os.path.abspath(__file__))
>>> PROJECTDIR = os.path.dirname(SELFDIR)
>>>
>>> from confselector import ConfSelector
>>> ConfSelector.configure([PROJECTDIR, os.path.join(PROJECTDIR, 'config'), os.path.join(PROJECTDIR, 'conf'), SELFDIR, ])
>>>
>>> pyfile, configobj = ConfSelector.selected('-dev')
>>> print(pyfile, configobj)
>>>
>>> pyfile, configobj = ConfSelector.selected('-prod')
>>> print(pyfile, configobj)
>>>
>>> pyfile, configobj = ConfSelector.selected('')
>>> print(pyfile, configobj)
>>>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
confselector-1.0.1.tar.gz
(3.7 kB
view hashes)