Skip to main content

wrapper for ConfigParser allowing for simple get,set,delete calls to set options from files, env variables, etc

Project description

configlib
=========

simple python wrapper for .conf file get, set, delete operations.

Use thusly:

.conf file:
```
[options]
somesetting=aDifferentValue

```

python code:
```
from configlib import getConfig,OptionParser
def initConfig():
#initialize config options
#sets defaults or overrides from config file.
options.something=getConfig('somesetting','defaultvalue',options.configfile)

if __name__ == "__main__":
parser=OptionParser()
parser.add_option("-c", dest='configfile' , default='', help="configuration file to use")
(options,args) = parser.parse_args()
initConfig()
```

pip install configlib


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

configlib-2.0.0.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distribution

configlib-2.0.0-py2-none-any.whl (8.5 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page