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.6.0.tar.gz (23.8 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.6.0-py3-none-any.whl (31.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for python_jsonpath-0.6.0.tar.gz
Algorithm Hash digest
SHA256 00f4098d45cfd5c6eb7f2919a37d5f9480db7df53f4b2fcccfc72d53fd5e0097
MD5 c4d0a8eb21d9d68bb804059c66ad4ba9
BLAKE2b-256 6b509b37cda98a228b4013cc0851430652493758b428ff19c463d5c4a6fba72b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_jsonpath-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d7ae80ba85eb9d60f3613c3a8728b1b2649b8a1a386361886f87a441058d8f3
MD5 8edc24fc683ecb5c5ae473f6d6bbb71a
BLAKE2b-256 8537445bfe8ec6cd4658f33fcc23187bade5858eb33d79df0cf147f26e774e0a

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