Python JSONPath Rust Bindings

1.1.1 · active · verified Fri Apr 17

Python bindings for the high-performance `jsonpath-rust` library, enabling fast JSONPath querying of Python dictionaries. It's currently at version 1.1.1 and has a relatively stable release cadence, focusing on minor updates and bug fixes.

Common errors

Warnings

Install

Imports

Quickstart

Parses a JSONPath expression and applies it to a Python dictionary, returning matching elements.

from jsonpath_rust import JsonPath

data = {
    "store": {
        "book": [
            {
                "category": "reference",
                "author": "Nigel Rees",
                "title": "Sayings of the Century",
                "price": 8.95
            },
            {
                "category": "fiction",
                "author": "Evelyn Waugh",
                "title": "Sword of Honour",
                "price": 12.99
            }
        ],
        "bicycle": {
            "color": "red",
            "price": 19.95
        }
    }
}

jsonpath = JsonPath.parse('$.store.book[*].author')
result = jsonpath.find(data)
print(result)

view raw JSON →