Another JSONPath implementation for Python.
Project description
Python JSONPath
A flexible JSONPath engine for Python.
Table of Contents
Install
Install Python JSONPath using pip:
pip install python-jsonpath
Or Pipenv:
pipenv install -u python-jsonpath
Links
- Documentation: https://jg-rp.github.io/python-jsonpath/.
- JSONPath Syntax: https://jg-rp.github.io/python-jsonpath/syntax/
- Change log: https://github.com/jg-rp/python-jsonpath/blob/main/CHANGELOG.md
- PyPi: https://pypi.org/project/python-jsonpath
- Source code: https://github.com/jg-rp/python-jsonpath
- Issue tracker: https://github.com/jg-rp/python-jsonpath/issues
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
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00f4098d45cfd5c6eb7f2919a37d5f9480db7df53f4b2fcccfc72d53fd5e0097
|
|
| MD5 |
c4d0a8eb21d9d68bb804059c66ad4ba9
|
|
| BLAKE2b-256 |
6b509b37cda98a228b4013cc0851430652493758b428ff19c463d5c4a6fba72b
|
File details
Details for the file python_jsonpath-0.6.0-py3-none-any.whl.
File metadata
- Download URL: python_jsonpath-0.6.0-py3-none-any.whl
- Upload date:
- Size: 31.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d7ae80ba85eb9d60f3613c3a8728b1b2649b8a1a386361886f87a441058d8f3
|
|
| MD5 |
8edc24fc683ecb5c5ae473f6d6bbb71a
|
|
| BLAKE2b-256 |
8537445bfe8ec6cd4658f33fcc23187bade5858eb33d79df0cf147f26e774e0a
|