Filtering JSON dict keys from STDOUT
Project description
json-grep
Description
Simple tool for filtering JSON dict keys from STDOUT
Usage
json-grep --help
usage: json-grep [-h] [-m] [-v] [-l HIGHLIGHT] [-i IHIGHLIGHT] [-e] [-f INPUT_FILE] filter_keys [filter_keys ...]
JSON GREP v1.3.1 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
-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
-e, --show-errors Show errors caused by json decode
-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
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
json-grep-1.3.1.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for json_grep-1.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 291b097a5c040b3cece943ec0d6aa00461fff3c3eba172bd0fadc68922ba6930 |
|
MD5 | f4927620a98f06e918c3036a5534d9bb |
|
BLAKE2b-256 | 8f7a71bf0ace746e234f7227fac5c74a5e7cc801ce43f4f261492e599bb73dc1 |