Skip to main content

ez-json-traverse Build Status Supported Python Version License

For easier traversing and exploration of JSON structures.

Provides a traversable sequence EZJL, traversable mapping EZJD and convenience methods like as_traversable.

Starting off

$ pip install ez-json-traverse

followed by

from ezjt import as_traversable

Dict stuff

d = {
    'a': {'name': 'Jane', 'age': {'unit': 'year', 'value': 12}},
    'b': {'name': 'John', 'age': {'unit': 'year', 'value': 14}},
    'c': {'name': 'Jill', 'age': {'unit': 'year', 'value': 10}}
}

t = as_traversable(d, sep='.', map_char='^')  # EZJD

# Normal key access
t['a']  # EZJD of {'name': 'Jane', 'age': {'unit': 'year', 'value': 12}}

# Path key access
t['a.name']  # 'Jane'

# Mapping across values
t['^.age.value']  # EZJD of [12, 14, 10]

List stuff

l = [[0, [1, 2]], [1, [2, 3]], [2, [3, 4]]]

t = as_traversable(l, sep='.', map_char='^')  # EZJL

# Normal key access
t[0]  # EZJL of [0, [1, 2]]
t['0']  # EZJL of [0, [1, 2]]

# Path key access
t['0.1.0']  # 1

# Mapping across values
t[':^.1.0']  # EZJL of [1, 2, 3]
t['1:-1^.1.0']  # EZJL of [2] 

Other conveniences

t = as_traversable(..., sep='.', map_char='^')  # EZJL

t.parent  # Parent container
t.root  # Root container
t.path  # Path from root container to current traversable
t.key  # Final key or index of current traversable

Metadata

Release files for ez-json-traverse 0.3.3

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

Source distribution (sdist)

Source distribution for ez-json-traverse 0.3.3
File Size Uploaded Provenance
ez-json-traverse-0.3.3.tar.gz 5.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ez-json-traverse 0.3.3
File Interpreter ABI Platform
ez_json_traverse-0.3.3-py3-none-any.whl Python 3 none any Details

Total release size: 13.0 kB

Release files / ez-json-traverse-0.3.3.tar.gz

Download URL ez-json-traverse-0.3.3.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
bc7f384d79eed8cc18eb30976eb2a93466b8b50817526ff21cb5a59d768d31fa
BLAKE2b-256 checksum
How to use checksums
3958568274a44ce61f05ca510b018b212ec96c60003012d16b163a00e82c3ddc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

Release files / ez_json_traverse-0.3.3-py3-none-any.whl

Download URL ez_json_traverse-0.3.3-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5e91cebed0942859950fe115fc18866c1a1178c23cc8cc7e2aaaf95f8829459
BLAKE2b-256 checksum
How to use checksums
7bcde750c5246620d67dd8acc7d620ae00eb5e48a27ca7f516fca35d0d7736ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

Security for ez-json-traverse 0.3.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.

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