Skip to main content

Another JSONPath implementation for Python.

Project description

Python JSONPath

A flexible JSONPath engine for Python.

License Tests
PyPi - Version Python versions


Table of Contents

Install

Install Python JSONPath using pip:

pip install python-jsonpath

Or Pipenv:

pipenv install -u python-jsonpath

Links

Example

import jsonpath

data = {
    "users": [
        {
            "name": "Sue",
            "score": 100,
        },
        {
            "name": "John",
            "score": 86,
        },
        {
            "name": "Sally",
            "score": 84,
        },
        {
            "name": "Jane",
            "score": 55,
        },
    ]
}

user_names = jsonpath.findall("$.users[?@.score < 100].name", data)
print(user_names) # ['John', 'Sally', 'Jane']

License

python-jsonpath is distributed under the terms of the MIT license.

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

python_jsonpath-0.7.0.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

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

python_jsonpath-0.7.0-py3-none-any.whl (32.2 kB view details)

Uploaded Python 3

File details

Details for the file python_jsonpath-0.7.0.tar.gz.

File metadata

  • Download URL: python_jsonpath-0.7.0.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for python_jsonpath-0.7.0.tar.gz
Algorithm Hash digest
SHA256 5753fe784f3828ed1efab41c782eac5b5ff8ce921cb7c4e443d55b745f31732c
MD5 3e041d4b534d048b1cda6d4d9472d61e
BLAKE2b-256 df39dc29bf03602d2d98b1f98a7d2ba620f674f43202cdf2782b551821b60b72

See more details on using hashes here.

File details

Details for the file python_jsonpath-0.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for python_jsonpath-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5127775931673412406350fe586d8b9ae88841e8205b9d0f409bf405cc455782
MD5 709ffe5389570d5dbc10948d66dc0109
BLAKE2b-256 c2c8ba93ae8da893892406289419cb06ba9b56315fbec167d105a66232fc9c40

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