Skip to main content

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

Project description

datasette-jq

PyPI CircleCI License

Datasette plugin that adds custom SQL functions 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.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

datasette_jq-0.2.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: datasette_jq-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.10

File hashes

Hashes for datasette_jq-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d67c45bfa912ae030aaeb331e48b7254756c00f6058fb403ce93860e8d2a11bb
MD5 2cece2547eb93419ee361b84211c6c19
BLAKE2b-256 6e4ffac9eb900ac6b33d24eebf9929c1fe212b27e245cb49b15a48c7e643110c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page