SerVal-Config-Utils
Description
SerVal-Config-Utils automatically parse configurations from multiple sources into a single python dictionary.
Installation
Dependencies
serval-config-utils requires:
- PyYAML (^6.0)
- mergedeep (^1.3.4)
User installation
The easiest way to install serval-config-parser is using pip
pip install -U serval-config-utils
Usage
In the python main file, use:
import configutils
config = configutils.get_config()
Call the main file with parameters
python main.py -c ./path/to/config.yaml \
-c ./path/to/config.json \
-p my.nested.parameter=value \
-j {"json_formatted":{"nested_parameter":"value"}} \
Access the merged config in the config dictionary.
Example
This simple examples merge the config from examples/basic_config.yaml and examples/basic_config.json and prints it in the standard output.
python examples/basic_example.py -c examples/basic_config.yaml -c examples/basic_config.json
Development
We welcome new contributors of all experience levels. Use pre-commit to ensure your code follows standards.
Source code
git clone https://github.com/serval-uni-lu/python-config-parser
Metadata
Release files for serval-config-utils 0.1.4
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 |
|---|---|---|---|---|
| serval-config-utils-0.1.4.tar.gz | 4.7 kB | Without provenance | Details for serval-config-utils-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| serval_config_utils-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for serval_config_utils-0.1.4-py3-none-any.whl |
Total release size: 9.3 kB
Release files / serval-config-utils-0.1.4.tar.gz
| Download URL | serval-config-utils-0.1.4.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ae293239e8480a86e8622bba1ff0be766da776817396d45041f69254479ee9e
|
|
BLAKE2b-256 checksum How to use checksums |
361ea4103b20d1e25ba8d11403398325632e9709c326a251c273e0d4382bda65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.6.15 Linux/5.10.102.1-microsoft-standard-WSL2
|
Release files / serval_config_utils-0.1.4-py3-none-any.whl
| Download URL | serval_config_utils-0.1.4-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a01eac9d232437d228918bd134da02f611466bc763fccda38f13de8b18cc044b
|
|
BLAKE2b-256 checksum How to use checksums |
28319a31a3f08315f2be322b484448d82b5443a46b4cdadcc39113c2ebf715cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.6.15 Linux/5.10.102.1-microsoft-standard-WSL2
|
Security for serval-config-utils 0.1.4
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.