Skip to content

simonw/sqlite-utils-jq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sqlite-utils-jq

PyPI Changelog Tests License

Plugin adding a jq() SQL function to sqlite-utils.

Installation

Install this plugin in the same environment as sqlite-utils:

sqlite-utils install sqlite-utils-jq

Usage

This plugin adds a jq() function for executing jq programs against JSON values.

sqlite-utils memory "select jq(:doc, :expr) as result" \
  -p doc '{"foo": "bar"}' \
  -p expr '.foo' \
  --table

Output:

result
--------
"bar"

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd sqlite-utils-jq
python3 -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

About

Plugin adding a jq() SQL function to sqlite-utils

Resources

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages