YamlSourceMap
Calculate JSON Pointers to each value within a YAML document along with the line, column and character position for the start and end of that value.
For example:
python -m pip install yaml_source_map
from yaml_source_map import calculate
print(calculate('foo: bar'))
The above prints:
{
"": Entry(
value_start=Location(line=0, column=0, position=0),
value_end=Location(line=0, column=8, position=8),
key_start=None,
key_end=None,
),
"/foo": Entry(
value_start=Location(line=0, column=5, position=5),
value_end=Location(line=0, column=8, position=8),
key_start=Location(line=0, column=0, position=0),
key_end=Location(line=0, column=3, position=3),
),
}
The following features have been implemented:
- support for primitive types (
strings,numbers,booleansandnull), - support for structural types (
sequenceandmapping).
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yaml_source_map-1.0.1.tar.gz
(5.0 kB
view details)
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 yaml_source_map-1.0.1.tar.gz.
File metadata
- Download URL: yaml_source_map-1.0.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6dc470b796a21e196f96996ca12c386e036379b287fd82c23e34e2a222af25f
|
|
| MD5 |
3c68a6bf73afb538d517a755c38f1f05
|
|
| BLAKE2b-256 |
56e3573cc467b277793aca94c6a6774d12ca2fd5191ddf53235c8428f7f6129b
|
File details
Details for the file yaml_source_map-1.0.1-py3-none-any.whl.
File metadata
- Download URL: yaml_source_map-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb5252d533aedb114a809f2ada28c4d4825a00a46ee08a9a9329c39a26813a13
|
|
| MD5 |
4206f9fa999ee60e433a3e65153e0371
|
|
| BLAKE2b-256 |
4aef6c244f21aa315047fa8ad95c63bfad88e97d499774b8108c6cdd510f2c2d
|