datasette-query-links by simonw

9 downloads this week        Star

README source code


PyPI Changelog Tests License

Turn SELECT queries returned by a query into links to execute them


Install this plugin in the same environment as Datasette.

$ datasette install datasette-query-links


This is an experimental plugin, requiring Datasette 0.59a1 or higher.

Any SQL query that returns a value that itself looks like a valid SQL query will be converted into a link to execute that SQL query when it is displayed in the Datasette interface.

These links will only show for valid SQL query - if a SQL query would return an error it will not be turned into a link.



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

cd datasette-query-links
python3 -mvenv venv
source venv/bin/activate

Or if you are using pipenv:

pipenv shell

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests: