json-grep
Description
Simple tool for filtering JSON dict keys from STDOUT
Usage
json-grep --help
usage: json-grep [-h] [-e EXCLUDE_KEYS] [-m] [-v] [-l HIGHLIGHT] [-i IHIGHLIGHT] [-s] [-f INPUT_FILE] filter_keys [filter_keys ...]
JSON GREP v1.4.6 is utility for filtering selected keys from json string piped from STDOUT
positional arguments:
filter_keys List of keys which you want to filter from json dict. If key is in deeper level of tree structure use '.' separator to specify how deep is key in dict tree structure. You can also use '*' at the end of key name to filter keys as 'beginning with'. You can also specify value of item which you want to pass only by operator '=' or
'~'. '~' means that value is somewhere in string.
options:
-h, --help show this help message and exit
-e EXCLUDE_KEYS, --exclude EXCLUDE_KEYS
Exclude lines contains key or key=value combination
-m, --multiline-output
Use multiline output for filtered result
-v, --values_only Show only values without keys description
-l HIGHLIGHT, --hl HIGHLIGHT
Highlight case sensitively words in filtered results
-i IHIGHLIGHT, --ihl IHIGHLIGHT
Highlight case insensitively words in filtered results
-s, --show-errors Show errors caused by json decode
-p, --pass-non-json Pass non json lines into stdout
-f INPUT_FILE, --file INPUT_FILE
Input file instead of PIPE
Installation
wget https://gitlab.com/alda78/json-grep/-/archive/master/json-grep-master.tar && \
tar -xf json-grep-master.tar && \
cd json-grep-master/ && \
sudo python3 setup.py install && \
cd ../ && \
sudo rm -rf json-grep-master
or simply
pip3 install json-grep
Metadata
Release files for json-grep 1.4.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| json_grep-1.4.7.tar.gz | 5.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| json_grep-1.4.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.3 kB
Release files / json_grep-1.4.7.tar.gz
| Download URL | json_grep-1.4.7.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2008575fb9a5bbc5a9b657002c410cf678ca7ffee3ade3f54ad29d21e802bb8c
|
|
BLAKE2b-256 checksum How to use checksums |
f50a74992027d686d8d876171d511f28af4d435a1b64cc785aaa574d79985a63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|
Release files / json_grep-1.4.7-py3-none-any.whl
| Download URL | json_grep-1.4.7-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ff5a2fef1e7487c38ded5cfa7ec70a2b59ad862fdf061dc6f98b0fe5f680bee2
|
|
BLAKE2b-256 checksum How to use checksums |
52378a1e640d800498d2769ead53bdc56213954a9ca3e5cc55d8963e46bb3d65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|