A jsonpath cli implementation powered by treepath technology.
Project description
The jsonpath_cli Package.
The jsonpath_cli is an extension to jsonpath_tp implementation built on top of treepath technology.
Quick Start Command Line Interface
To use the cli install the jsonpath_cli python package in a venv:
python -m venv venv
source bin venv/bin/activate
pip install jsonpath_cli
A jsonpath example that gets c's value from json data. jsonpath "$.star.planets.inner[?(@.name=='Earth')].name" tests/data/solar-system.json
"Earth"
Solar System Json Document
The examples shown in this README use the following json document. It describes our solar system. Click to expand.
solar_system = {...}
{
"star": {
"name": "Sun",
"diameter": 1391016,
"age": null,
"planets": {
"inner": [
{
"name": "Mercury",
"Number of Moons": "0",
"diameter": 4879,
"has-moons": false
},
{
"name": "Venus",
"Number of Moons": "0",
"diameter": 12104,
"has-moons": false
},
{
"name": "Earth",
"Number of Moons": "1",
"diameter": 12756,
"has-moons": true
},
{
"name": "Mars",
"Number of Moons": "2",
"diameter": 6792,
"has-moons": true
}
],
"outer": [
{
"name": "Jupiter",
"Number of Moons": "79",
"diameter": 142984,
"has-moons": true
},
{
"name": "Saturn",
"Number of Moons": "82",
"diameter": 120536,
"has-moons": true
},
{
"name": "Uranus",
"Number of Moons": "27",
"diameter": 51118,
"has-moons": true
},
{
"name": "Neptune",
"Number of Moons": "14",
"diameter": 49528,
"has-moons": true
}
]
}
}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 jsonpath_cli-0.0.2.dev0.tar.gz.
File metadata
- Download URL: jsonpath_cli-0.0.2.dev0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
047ec1fa7c0144d004d2bcb62fb10fb54e285f72f1dbed314d5f32dd97035b4d
|
|
| MD5 |
b3940463e26bf2a4f9e292110bfebf49
|
|
| BLAKE2b-256 |
5a0309df1517f72afe3c92496e3ef80a6eeda2a69e9fcf3f3773c24e24bdadff
|
File details
Details for the file jsonpath_cli-0.0.2.dev0-py3-none-any.whl.
File metadata
- Download URL: jsonpath_cli-0.0.2.dev0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d1f192d7448b3cd92af4fad8ee40a3793124d53e56f47d604cf287625a13fe4
|
|
| MD5 |
1335e696127c778ace14f2737ff41db6
|
|
| BLAKE2b-256 |
e323d1ae9c7a381c71a84109be74cc9414678ae1b47b04c4d9b541e140d07060
|