jqgpt
jqgpt is a gpt powered tool that helps you write jq queries. It takes a human user query and a json file as input and outputs a jq query that answers the user query.
It accomplishes this by sending a very helpful jq prompt with tons of examples and a sample from the json file to the model.
Examples
$ jqgpt 'Get the total number of clams of type dolphin' seaCreatures.json
jq 'map(select(.type == "dolphin").clams) | add' seaCreatures.json
$ cat seaCreatures.json | jqgpt 'Get the names of sea creatures'
jq -r '.[] | .name' seaCreatures.json
Setup
You can install this using
pip install jqgpt
Requirements:
- openai python package
- OPENAI_API_KEY env var
Metadata
Release files for jqgpt 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jqgpt-0.1.1.tar.gz | 9.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jqgpt-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.2 kB
Release files / jqgpt-0.1.1.tar.gz
| Download URL | jqgpt-0.1.1.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c79ebf2ef7f4a40432189b5a2c63e5938a1701e44b0c65d571ae0b8cca74f83b
|
|
BLAKE2b-256 checksum How to use checksums |
bbafaa8892ac99cbe9dfbf20dd86dc3eaa30f4bcf516999b85cf1aaed3afb368
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.8
|
Release files / jqgpt-0.1.1-py3-none-any.whl
| Download URL | jqgpt-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
665ccd95e96144cfaf3e833ec8de43f5a79930cd36e7d4f0db1316d37dc8380d
|
|
BLAKE2b-256 checksum How to use checksums |
83f6d1102f21f64be0ec06a55a5fa48de7817dc46fda20818f844e86dd1ae1ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.8
|