https://github.com/wkentaro/jqk-python
Render a JSON with jq patterns. Faster version in Rust -> https://github.com/wkentaro/jqk
https://github.com/wkentaro/jqk-python
command-line command-line-tool jq json
Last synced: 4 months ago
JSON representation
Render a JSON with jq patterns. Faster version in Rust -> https://github.com/wkentaro/jqk
- Host: GitHub
- URL: https://github.com/wkentaro/jqk-python
- Owner: wkentaro
- License: mit
- Created: 2022-12-04T09:12:40.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-20T02:10:30.000Z (about 2 years ago)
- Last Synced: 2025-03-27T21:47:51.078Z (7 months ago)
- Topics: command-line, command-line-tool, jq, json
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### DISCLAIMER
[Jqk](https://github.com/wkentaro/jqk), which is written in Rust language is
much faster than this, so it is highly recommended over this Python version
unless there is legitimate reasons.# jqk-python
## Installation
```
pip install git+https://github.com/wkentaro/jqk-python
```## Usage
```
usage: jqk [-h] [--color-output]jqk - Query key finder for jq [version 0.1]
Example:
$ echo '{"japan": [{"name": "tokyo", "population": "14M"}, {"name": "osaka", "population": "2.7M"}]}' > data.json
$ cat data.json | jqk
{
.japan: [
{
.japan[0].name: "tokyo",
.japan[0].population: "14M"
},
{
.japan[1].name: "osaka",
.japan[1].population: "2.7M"
}
]
}$ cat data.json | jq .japan | jqk
[
{
.[0].name: "tokyo",
.[0].population: "14M"
},
{
.[1].name: "osaka",
.[1].population: "2.7M"
}
]$ cat data.json | jq .japan[1].population -r
2.7M
positional arguments:
file JSON file to parse (default: None)options:
-h, --help show this help message and exit
--version, -V display version (default: None)
--color-output, -C force color output even with pipe (default: False)
--list, -l list all keys (default: False)
```## Related projects
- `jq`: https://github.com/jqlang/jq
- `jqk`: https://github.com/wkentaro/jqk