Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jsonpath_cli-0.0.0.dev0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jsonpath_cli-0.0.0.dev0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file jsonpath_cli-0.0.0.dev0.tar.gz.

File metadata

  • Download URL: jsonpath_cli-0.0.0.dev0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.9

File hashes

Hashes for jsonpath_cli-0.0.0.dev0.tar.gz
Algorithm Hash digest
SHA256 1ceb16db43e26971c0bb0f99453787a8859811a8d2c365536f61ac60cf8fbd2e
MD5 e9f6a5f9a26e637004f41ecdb80ca2a4
BLAKE2b-256 f6e91bbbb2e3b8c8b7ba29ec939ddd9c5661d7bb96be2d4353c6b5d0241e70be

See more details on using hashes here.

File details

Details for the file jsonpath_cli-0.0.0.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for jsonpath_cli-0.0.0.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e6695c671d80be5541abb89f1e76e8a19ca53319af4304b70a9edb461a55b74
MD5 ebd8bef959072957d49024b887e61413
BLAKE2b-256 c8276beb2e04f4a65095c3efccd4f9d814e36374c623ac4feb606bcbd1ff744c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page