Skip to main content

Another JSONPath implementation for Python.

Project description

Python JSONPath

PyPI - Version GitHub Workflow Status PyPI - License PyPI - Python Version


A flexible JSONPath engine for Python.

Table of Contents

Install

Install Python JSONPath using Pipenv:

pipenv install -u python-jsonpath

or pip:

pip install python-jsonpath

Links

Example

import jsonpath

data = {
    "categories": [
        {
            "name": "footwear",
            "products": [
                {
                    "title": "Trainers",
                    "description": "Fashionable trainers.",
                    "price": 89.99,
                },
                {
                    "title": "Barefoot Trainers",
                    "description": "Running trainers.",
                    "price": 130.00,
                },
            ],
        },
        {
            "name": "headwear",
            "products": [
                {
                    "title": "Cap",
                    "description": "Baseball cap",
                    "price": 15.00,
                },
                {
                    "title": "Beanie",
                    "description": "Winter running hat.",
                    "price": 9.00,
                },
            ],
        },
    ],
    "price_cap": 10,
}

products = jsonpath.findall("$..products.*", data)
print(products)

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.5.0.post1.tar.gz (22.5 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.5.0.post1-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

Details for the file python_jsonpath-0.5.0.post1.tar.gz.

File metadata

  • Download URL: python_jsonpath-0.5.0.post1.tar.gz
  • Upload date:
  • Size: 22.5 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.5.0.post1.tar.gz
Algorithm Hash digest
SHA256 ca420437680170da36e3337f3865e31eac9548d55f1f6d3b4059df09bf5f03d8
MD5 244fb76a0cdaa6b26f77c6d369b03a58
BLAKE2b-256 5134ad7002e36949d988bb6323620e88144dbc34da89b26defaf92099e1f28c2

See more details on using hashes here.

File details

Details for the file python_jsonpath-0.5.0.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for python_jsonpath-0.5.0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 8d463e09b343a1c734dc455bbd54bce1ce45f5dd48d84f40e9f03708b0b9db84
MD5 f8a0668a3889ee2b724f740d6cbeff8a
BLAKE2b-256 9f0eb014da943d001b9805b257169c122a937db92bd438cbb80aa977cf551b3a

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