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
Release files for configlib 2.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| configlib-2.0.4.tar.gz | 2.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| configlib-2.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.2 kB
Release files / configlib-2.0.4.tar.gz
| Download URL | configlib-2.0.4.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
919d6b2c435ebd45195188a1d1ad79692a846bd77cc835e5edc888fb36f9854b
|
|
BLAKE2b-256 checksum How to use checksums |
635187fa8ccc6880086936db0f80d5ea11e0591f11e71cd27c574550c35da603
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / configlib-2.0.4-py3-none-any.whl
| Download URL | configlib-2.0.4-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b3d90bdf762198b8260d17481628675fa361bf774d33a42c3121619e2f76a818
|
|
BLAKE2b-256 checksum How to use checksums |
b868e89abe6a2645de8caae317a51eb7b48c12c37a35e2daafec660ccb8db58b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|