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.7.0.tar.gz
(24.3 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.7.0.tar.gz.
File metadata
- Download URL: python_jsonpath-0.7.0.tar.gz
- Upload date:
- Size: 24.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5753fe784f3828ed1efab41c782eac5b5ff8ce921cb7c4e443d55b745f31732c
|
|
| MD5 |
3e041d4b534d048b1cda6d4d9472d61e
|
|
| BLAKE2b-256 |
df39dc29bf03602d2d98b1f98a7d2ba620f674f43202cdf2782b551821b60b72
|
File details
Details for the file python_jsonpath-0.7.0-py3-none-any.whl.
File metadata
- Download URL: python_jsonpath-0.7.0-py3-none-any.whl
- Upload date:
- Size: 32.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5127775931673412406350fe586d8b9ae88841e8205b9d0f409bf405cc455782
|
|
| MD5 |
709ffe5389570d5dbc10948d66dc0109
|
|
| BLAKE2b-256 |
c2c8ba93ae8da893892406289419cb06ba9b56315fbec167d105a66232fc9c40
|