Custom configuration parser based on a tree
Project description
treeconfigparser
Custom configuration parser based on a tree.
Installation
Install using pip:
$ pip install treeconfigparser
or using conda:
$ conda install -c alfarchi treeconfigparser
Main usage
>>> import treeconfigparser as tcp
>>> config = tcp.TreeConfigParser()
>>> config.read_file(file_name)
>>> config.get(['sec1', 'subsec11', 'opt1'])
'val1'
Features
- Arbitrary configuration tree are possible.
- Can read and parse configuration file. Two different and intuitive file formats are supported.
- Configuration files can include comments and cross-references between options.
- Alternatively, the configuration can be manipulated using the class methods.
- The access to options is simple and supports customised type conversions.
- The configuration can also be written to a file to be re-used later on.
More details can be found in the documentation.
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 treeconfigparser-1.1.0.tar.gz.
File metadata
- Download URL: treeconfigparser-1.1.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58d90d89ce49ea9569016483c8e32a6523798db9bf943a7853863e77f978afdc
|
|
| MD5 |
f7ddb0c83565f0290bb8c946b6a5b276
|
|
| BLAKE2b-256 |
e5793e7e8e09a37d10bc944ec839f39aacbfe8029445a4f02a293cd2f2224d9d
|
File details
Details for the file treeconfigparser-1.1.0-py3-none-any.whl.
File metadata
- Download URL: treeconfigparser-1.1.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bed635764edaf5141301adeb745d4137631a18eed2a56692350a817f892663a1
|
|
| MD5 |
24fafc725fc1ce636b6e8699c90b9d8c
|
|
| BLAKE2b-256 |
72e38161b698af1a837289f4f76de87b55ccc1e4cea620e9e9b14d30a5e98029
|