This is a python project that parses the configuration file for the "key = value" type.
Project description
This is a python project that parses the configuration file for the "key = value" type.
Usage :
# analysis.conf
# remark ...
key1 = value1
key2 = value2
------------
Create a ConfigAnalysis object:
from pyConfigAnalysis import ConfigAnalysis
config = ConfigAnalysis()
config.read("analysis.conf")
Get all of the key:
config.keys()
->["key1","key2"]
Get the value from a key:
config.get("key1")
->"value1"
Update a configuration
config.update("key2","newvalue2")
#check
config.get("key2")
->"newvalue2"
#save to configuration file
config.save()
Add a configuration
config.add("key3","value3")
#check
config.get("key3")
->"value3"
#save to configuration file
config.save()
Usage :
# analysis.conf
# remark ...
key1 = value1
key2 = value2
------------
Create a ConfigAnalysis object:
from pyConfigAnalysis import ConfigAnalysis
config = ConfigAnalysis()
config.read("analysis.conf")
Get all of the key:
config.keys()
->["key1","key2"]
Get the value from a key:
config.get("key1")
->"value1"
Update a configuration
config.update("key2","newvalue2")
#check
config.get("key2")
->"newvalue2"
#save to configuration file
config.save()
Add a configuration
config.add("key3","value3")
#check
config.get("key3")
->"value3"
#save to configuration file
config.save()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for pyConfigAnalysis-1.0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e07c385fc4d4935c0b7df48dfe5674e6b53eb0cf92c76fdc25cbe1915098efe7 |
|
MD5 | 247478253ed7c8a50b1bf71a88d58535 |
|
BLAKE2b-256 | a2bf6fec62d35cbf4774a7e75875590b301c29f247f7b240ac3206ae8545b6ff |