Skip to main content

JQ-By-Example

PyPI Python 3.10+ License: MIT

AI-powered jq filter synthesis from input/output JSON examples.

You know what JSON transformation you want, but writing the jq filter is tricky? Just provide examples — JQ-By-Example synthesizes the filter for you.

Installation

pip install jq-by-example

Requires jq binary: brew install jq (macOS) or apt install jq (Linux)

Quick Start

export OPENAI_API_KEY='sk-...'

jq-by-example \
  --input '{"user": {"name": "Alice"}}' \
  --output '"Alice"' \
  --desc "Extract name"

# Output: .user.name

Features

  • 🤖 LLM-Powered — Uses OpenAI, Anthropic, or local Ollama
  • 🔄 Iterative Refinement — Automatically improves filters based on feedback
  • Verified — Executes against real jq binary to ensure correctness
  • 📊 Diagnostics — Detailed error classification and scoring

Documentation

Full documentation: github.com/nulone/jq-by-example

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jq_by_example-0.2.1.tar.gz (71.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jq_by_example-0.2.1-py3-none-any.whl (30.5 kB view details)

Uploaded Python 3

File details

Details for the file jq_by_example-0.2.1.tar.gz.

File metadata

  • Download URL: jq_by_example-0.2.1.tar.gz
  • Upload date:
  • Size: 71.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for jq_by_example-0.2.1.tar.gz
Algorithm Hash digest
SHA256 c42caa28d2c0fa53519a125176c2a5c6ce8e6e3dfa2aa88018be3c865ed15e9f
MD5 3f81efa212c0f00e9524df3a259b1a49
BLAKE2b-256 738cbff59401aa1f93fc92477c0c27ef150cccb63856dbbcde1f20f78a3a1e32

See more details on using hashes here.

File details

Details for the file jq_by_example-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: jq_by_example-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 30.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for jq_by_example-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5d9b589aa0a7959cb2475d3754444b8154b54abd4e7977c9b0e1f602c4c5f053
MD5 84b9255697a5e7bbb08f62ce34925815
BLAKE2b-256 95d4f9ca5ec13e5e1f0c572301693ec0c12baedeeae99af7135bcf6e29e49c86

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 files

0.2.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page