jconfigparser
jconfigparser is an extension of the python configparser standard module which adds the following features inspired by TOML:
- Section name depth with dot notation:
[a.b] - Values on right hand side can be everything that is understood by JSON.
- Values that appear twice or more often are stored as a
list, see exampleoutputbelow (this behavior is configurable).
Example
Say we have the following configuration file in test.jconf:
[atoms]
file: geometry.in
format: aims
[calculator.aims]
xc: pbesol
charge_mix_param: 0.3
sc_accuracy_rho: 1e-6
output: band 0 0 0 0.00 0.25 0.25 50 Gamma Delta
output: band 0.00 0.25 0.25 0 0.5 0.5 50 Delta X
[calculator.socketio]
port: null
[basissets.aims]
default: light
This file can be parsed with
import jconfigparser as jc
config = jc.Config('test.jconf')
config will be a modified dict that hold the information like
{
"atoms": {"file": "geometry.in", "format": "aims"},
"calculator": {
"aims": {
"xc": "pbesol",
"charge_mix_param": 0.3,
"sc_accuracy_rho": 1e-06,
"output": [
"band 0 0 0 0.00 0.25 0.25 50 Gamma Delta",
"band 0.00 0.25 0.25 0 0.5 0.5 50 Delta X",
],
},
"socketio": {"port": None},
},
"basissets": {"aims": {"default": "light"}},
}
Furthermore, config supports
- Attribute access, e.g.,
config.atoms.file - Write itself:
config.write("new.jconf")
Changelog
- v0.1.3: per default, use case-sensitive keys
Metadata
Release files for jconfigparser 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jconfigparser-0.1.3.tar.gz | 5.8 kB | Without provenance | Details for jconfigparser-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jconfigparser-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for jconfigparser-0.1.3-py3-none-any.whl |
Total release size: 11.9 kB
Release files / jconfigparser-0.1.3.tar.gz
| Download URL | jconfigparser-0.1.3.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
87639f3fa31d95829e4925c2001209cf5d7e84817970a461e552bf43d9d23883
|
|
BLAKE2b-256 checksum How to use checksums |
b8051579e43f234048bb40bffb978ef1f3e525a85181c0f2947e896b390b6144
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.9 CPython/3.8.1 Linux/4.15.0-122-generic
|
Release files / jconfigparser-0.1.3-py3-none-any.whl
| Download URL | jconfigparser-0.1.3-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
910b1b7b97708bc7f2996fb29c4d26ea8147cbdc4f31aaaa1d552f536d97139d
|
|
BLAKE2b-256 checksum How to use checksums |
03087bdf6208516ca96edaf65edf11f936687677ecbf5fb36a11941b71310b49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.9 CPython/3.8.1 Linux/4.15.0-122-generic
|
Security for jconfigparser 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.