Skip to main content

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] [-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

Project details


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.4.7.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

json_grep-1.4.7-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file json_grep-1.4.7.tar.gz.

File metadata

  • Download URL: json_grep-1.4.7.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for json_grep-1.4.7.tar.gz
Algorithm Hash digest
SHA256 2008575fb9a5bbc5a9b657002c410cf678ca7ffee3ade3f54ad29d21e802bb8c
MD5 ed3291dccf6b3d8c2e0a039fb3512fc1
BLAKE2b-256 f50a74992027d686d8d876171d511f28af4d435a1b64cc785aaa574d79985a63

See more details on using hashes here.

File details

Details for the file json_grep-1.4.7-py3-none-any.whl.

File metadata

  • Download URL: json_grep-1.4.7-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for json_grep-1.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 ff5a2fef1e7487c38ded5cfa7ec70a2b59ad862fdf061dc6f98b0fe5f680bee2
MD5 e77601dcdfdb8925375a5fefefc120c2
BLAKE2b-256 52378a1e640d800498d2769ead53bdc56213954a9ca3e5cc55d8963e46bb3d65

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page