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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyConfigAnalysis-1.0.4.tar.gz.
File metadata
- Download URL: pyConfigAnalysis-1.0.4.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6651c884b124ca86237b48b58da2f240906ea949ce65ae4cb4ec320309d5570a
|
|
| MD5 |
1017a912fc6528bca21d573bfa2ec7a5
|
|
| BLAKE2b-256 |
67cc4e397a05c0cee15dc8198c0fcd966d117039103647e7385c2f71fb492828
|
File details
Details for the file pyConfigAnalysis-1.0.4-py3-none-any.whl.
File metadata
- Download URL: pyConfigAnalysis-1.0.4-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8bbeb468fd537fe98727967450f612b0f1c0b4fcb25ee6f02e149ef2e9af3df
|
|
| MD5 |
84ca8ae9ed43f3a57b0474e5998d0c6b
|
|
| BLAKE2b-256 |
0639c17e4676276c897f6c6281919ae3fd2aa210dd7db83a132817d7ca09c19b
|