dj
datasette-jq
pypi i datasette-jq
dj

datasette-jq

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

by Simon Willison

0.2.1 (see all)License:Apache License, Version 2.0
pypi i datasette-jq
Readme

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.

GitHub Stars

13

LAST COMMIT

2yrs ago

MAINTAINERS

1

CONTRIBUTORS

1

OPEN ISSUES

1

OPEN PRs

0
VersionTagPublished
0.2.1
2yrs ago
0.2
3yrs ago
0.1
3yrs ago
No alternatives found
No tutorials found
Add a tutorial