Skip to main content

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, booleans and null),
  • support for structural types (sequence and mapping).

Metadata

Release files for yaml-source-map 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yaml-source-map 1.0.1
File Size Uploaded
yaml_source_map-1.0.1.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yaml-source-map 1.0.1
File Interpreter ABI Platform
yaml_source_map-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 kB

Release files / yaml_source_map-1.0.1.tar.gz

Download URL yaml_source_map-1.0.1.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e6dc470b796a21e196f96996ca12c386e036379b287fd82c23e34e2a222af25f
BLAKE2b-256 checksum
How to use checksums
56e3573cc467b277793aca94c6a6774d12ca2fd5191ddf53235c8428f7f6129b
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / yaml_source_map-1.0.1-py3-none-any.whl

Download URL yaml_source_map-1.0.1-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cb5252d533aedb114a809f2ada28c4d4825a00a46ee08a9a9329c39a26813a13
BLAKE2b-256 checksum
How to use checksums
4aef6c244f21aa315047fa8ad95c63bfad88e97d499774b8108c6cdd510f2c2d
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page