Skip to main content

wrapper for ConfigParser allowing for simple get calls to set options.

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.4.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

configlib-2.0.4-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file configlib-2.0.4.tar.gz.

File metadata

  • Download URL: configlib-2.0.4.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for configlib-2.0.4.tar.gz
Algorithm Hash digest
SHA256 919d6b2c435ebd45195188a1d1ad79692a846bd77cc835e5edc888fb36f9854b
MD5 d68bd3c8f316264f1f309b4e260335c4
BLAKE2b-256 635187fa8ccc6880086936db0f80d5ea11e0591f11e71cd27c574550c35da603

See more details on using hashes here.

File details

Details for the file configlib-2.0.4-py3-none-any.whl.

File metadata

  • Download URL: configlib-2.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for configlib-2.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b3d90bdf762198b8260d17481628675fa361bf774d33a42c3121619e2f76a818
MD5 c39af6fa496bd4a97e720ef628ef2685
BLAKE2b-256 b868e89abe6a2645de8caae317a51eb7b48c12c37a35e2daafec660ccb8db58b

See more details on using hashes here.

Supported by

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