Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

dQuery: XPath for querying nested data for Python

Uses funcy and pyparsing as dependencies.

There are some examples in dpath/tests.py

API is very fluid right now, but the general idea is like this:

data = [
    {"a": [3, 4, 5, {"z": 10}], "z": "zz"},
    {"b": "uj", "a": {"z": "az"}, "z": "zz"},
    ["argh", "asssert", "so", "on"],
]

assert query(data, "**/z") == ['zz', 10, 'zz', 'az']

About

XPath like notation for querying JSON (nested dicts and lists) data

Resources

Releases

No releases published

Packages

No packages published

Languages