A Python port of `gron`
Project description
Gronpy
A Python port of gron to make JSON greppable.
Installation
The recommended way to install is to use pipx
:
pipx install gronpy
Usage
% gronpy --help
Usage: gronpy [OPTIONS] [INPUT_PATH]
╭─ Arguments ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ input_path [INPUT_PATH] Input file path or URL. If not specified uses stdin. [default: (stdin)] │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --gron --ungron Transform JSON into GRON or back again [default: gron] │
│ --color --no-color Enable colouring in terminal. [default: color] │
│ --version -v │
│ --install-completion [bash|zsh|fish|powershell|pwsh] Install completion for the specified shell. [default: None] │
│ --show-completion [bash|zsh|fish|powershell|pwsh] Show completion for the specified shell, to copy it or customize the installation. │
│ [default: None] │
│ --help Show this message and exit. │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Example
% gronpy "https://api.tvmaze.com/schedule?country=GB" | grep "show.name" | grep -i "news"
json[34].show.name = "Newsround";
json[40].show.name = "Channel 4 News Summary";
json[43].show.name = "BBC News at One";
json[44].show.name = "ITV Lunchtime News";
json[45].show.name = "5 News Lunchtime";
json[53].show.name = "5 News";
json[56].show.name = "BBC News at Six";
json[58].show.name = "ITV Evening News";
json[59].show.name = "Channel 4 News";
json[76].show.name = "ITV News at Ten";
json[77].show.name = "Newsnight";
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
gronpy-0.1.1.tar.gz
(3.5 kB
view hashes)
Built Distribution
gronpy-0.1.1-py3-none-any.whl
(4.5 kB
view hashes)