Datasette plugin that adds custom SQL functions for executing jq expressions against JSON values
Project description
datasette-jq
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
Release history Release notifications | RSS feed
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
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | d67c45bfa912ae030aaeb331e48b7254756c00f6058fb403ce93860e8d2a11bb |
|
MD5 | 2cece2547eb93419ee361b84211c6c19 |
|
BLAKE2b-256 | 6e4ffac9eb900ac6b33d24eebf9929c1fe212b27e245cb49b15a48c7e643110c |