Skip to main content

Datasette plugin that adds a custom SQL function for executing jq expressions against JSON values

Project description

datasette-jq

PyPI CircleCI License

Datasette plugin that adds a custom SQL function for executing jq expressions against JSON values.

Install this plugin in the same environment as Datasette to enable the jq() SQL function.

Usage:

select jq(
    column_with_json,
    "{top_3: .classifiers[:3], v: .version}"
)

See the jq manual for full details of supported expression syntax.

Interactive demo

You can try this plugin out at datasette-jq-demo.datasette.io

Sample query:

select package, "https://pypi.org/project/" || package || "/" as url,
jq(info, "{summary: .info.summary, author: .info.author, versions: .releases|keys|reverse}")
from packages

Try this query out in the interactive demo.

Project details


Download files

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

Files for datasette-jq, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size datasette_jq-0.2-py3-none-any.whl (6.5 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page