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
File details
Details for the file datasette-query-links-0.1.2.tar.gz
.
File metadata
- Download URL: datasette-query-links-0.1.2.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd81b27dd9e419eb40e157e0d4a0a8c6b0d27c80bb8f4aebd5f741990b481c8b |
|
MD5 | f85e145029995c7e95bbdfe4403dad5a |
|
BLAKE2b-256 | 4a349cac2a94bdf9c4ebea8d89ae86ba80ebd7d9f3f9a5dc9939e1dfb12dd25d |
File details
Details for the file datasette_query_links-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: datasette_query_links-0.1.2-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6adec788fc559bdbd09ff38e50a04c65885d9de6b6fe8ea2d75b90c0492a3387 |
|
MD5 | b0e09729af0f08c021d652b8b0cd8008 |
|
BLAKE2b-256 | 1467422dbc505c2cc9aca15848b188bdfa06d4d9db32ec9069a00c2a8ef5512c |