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 Distribution
pyConfigAnalysis-1.0.1.tar.gz
(2.7 kB
view hashes)
Built Distributions
Close
Hashes for pyConfigAnalysis-1.0.1-py3.6.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35a618f943dc202864e00ef1a7bf9de52c2a8cf7dc3fe76fcd4edd33bf361f36 |
|
MD5 | 20475788d8776764a49e77dcc6c1a022 |
|
BLAKE2b-256 | 49fdc0c4666e2912fa290bb81cf1037a9f7102428b5bd95cf8cf5704391c8e58 |
Close
Hashes for pyConfigAnalysis-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad17930c5f17a6bc9f454cc9cd5175c631a3ac4f1d62534e9254e4866749bbfa |
|
MD5 | a9442307100696633c8d4cd876b8f40d |
|
BLAKE2b-256 | 84231a29194bb436e1bf4abcfeab9f00359e202db40da7c728b966087d64a42b |
Close
Hashes for pyConfigAnalysis-1.0.1-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 963950038b9e6c2a013e56e39a153065d113ae6523484125c3d305e173fe7b57 |
|
MD5 | 05b562ef0a66660053493e237003dcea |
|
BLAKE2b-256 | 05238a8c46d6835cc1a2f3bc72bf9d92a41d58a2f1260bbf8953c8bba8b9ee3a |