Turn SELECT queries returned by a query into links to execute them
Project description
datasette-query-links
Turn SELECT queries returned by a query into links to execute them
Installation
Install this plugin in the same environment as Datasette.
$ datasette install datasette-query-links
Usage
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.
Demo
- Here's an example query showing the plugin in action.
Development
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:
pytest
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 Distribution
Built Distribution
Hashes for datasette-query-links-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd81b27dd9e419eb40e157e0d4a0a8c6b0d27c80bb8f4aebd5f741990b481c8b |
|
MD5 | f85e145029995c7e95bbdfe4403dad5a |
|
BLAKE2b-256 | 4a349cac2a94bdf9c4ebea8d89ae86ba80ebd7d9f3f9a5dc9939e1dfb12dd25d |
Hashes for datasette_query_links-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6adec788fc559bdbd09ff38e50a04c65885d9de6b6fe8ea2d75b90c0492a3387 |
|
MD5 | b0e09729af0f08c021d652b8b0cd8008 |
|
BLAKE2b-256 | 1467422dbc505c2cc9aca15848b188bdfa06d4d9db32ec9069a00c2a8ef5512c |