Schemed YAML Config
Schemed YAML Config is a library to read and validate YAML based configuration files against JSON Schema specifications.
Branches
The project is transitioning from v0.x to v1.x and master branch is used to develop the latter.
There's significant changes between v0.x and v1.x. And, while new user are encouraged to look into v1.x, that might be troublesome for those who have developed code around v0.x
Install
Schemed-yaml-config can be installed via PIP
# pip install schemed-yaml-config
Under the hood
Schemed YAML Config works by converting YAML files into a dictionarie by mean of the well known PyYAML framework and then by applying JSON Schema specifications before of returning it to rest of the script.
The beauty of this approach is it combines the human friendly serialization of YAML with the power of JSON Schema.
A few tricks has been added to make the library even more human friendly. For instance when the a configuration file is missing and a default is created, order and comments of the keys from the schema are borrowed to the YAML file.
Syntax
Python 3.7.4 (default, Aug 21 2019, 16:01:23)
[GCC 9.2.1 20190813] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> from schemed_yaml_config import get_config
>>> config = get_config('config.yml', 'schema.yml')
>>> print(config)
{'listen': {'host': 'localhost', 'port': 8080}, 'tmpdir': '/tmp/'}
>>>
TOML
Despite its name Schemed YAML Config also supports TOML. TOML schemas are not supported yet!
Metadata
Release files for schemed-yaml-config 1.0.5
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 |
|---|---|---|---|---|
| schemed-yaml-config-1.0.5.linux-x86_64.tar.gz | 14.4 kB | Without provenance | Details for schemed-yaml-config-1.0.5.linux-x86_64.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| schemed_yaml_config-1.0.5-py3.9.egg | Legacy Egg format | - | - | Details for schemed_yaml_config-1.0.5-py3.9.egg |
| schemed_yaml_config-1.0.5-py3-none-any.whl | Python 3 | none | any | Details for schemed_yaml_config-1.0.5-py3-none-any.whl |
Total release size: 46.7 kB
Release files / schemed-yaml-config-1.0.5.linux-x86_64.tar.gz
| Download URL | schemed-yaml-config-1.0.5.linux-x86_64.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9761edfcdacdacd0ef5f05344df3fe5510985a5928ce52a212f76aa9da597960
|
|
BLAKE2b-256 checksum How to use checksums |
4d81e21a64bcfb2f31ea18184ca6d397a4725bffd33be53157cbf2557aa4c4f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8
|
Release files / schemed_yaml_config-1.0.5-py3.9.egg
| Download URL | schemed_yaml_config-1.0.5-py3.9.egg |
|---|---|
| Size | 19.9 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
f93b65e02862084775b459e53b7a86b5f8f4318c7861465a905d3f5c6e4e6e3e
|
|
BLAKE2b-256 checksum How to use checksums |
7d5d5f0cab0e81491b558fdf3cc3b036b1e88dd0cca0c6f56fb947248c55798a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8
|
Release files / schemed_yaml_config-1.0.5-py3-none-any.whl
| Download URL | schemed_yaml_config-1.0.5-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0593f3e19727fd8538f99d3365387be9a2098b990182a3c7a79e4a6b48095433
|
|
BLAKE2b-256 checksum How to use checksums |
1ed33dbc48d1d0f94cd79cb36be3957acb2cb0eaad9f8226302c4320d65b1470
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8
|
Security for schemed-yaml-config 1.0.5
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.