datasette-query-links-0.1.2
توضیحات
Turn SELECT queries returned by a query into links to execute them
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | datasette-query-links-0.1.2 |
| نام | datasette-query-links |
| نسخه کتابخانه | 0.1.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Simon Willison |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/simonw/datasette-query-links |
| آدرس اینترنتی | https://pypi.org/project/datasette-query-links/ |
| مجوز | Apache License, Version 2.0 |
# datasette-query-links
[](https://pypi.org/project/datasette-query-links/)
[](https://github.com/simonw/datasette-query-links/releases)
[](https://github.com/simonw/datasette-query-links/actions?query=workflow%3ATest)
[](https://github.com/simonw/datasette-query-links/blob/main/LICENSE)
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](https://latest-with-plugins.datasette.io/fixtures?sql=select%0D%0A++%27select+*+from+%5Bfacetable%5D%27+as+query%0D%0Aunion%0D%0Aselect%0D%0A++%27select+sqlite_version()%27%0D%0Aunion%0D%0Aselect%0D%0A++%27select+this+is+invalid+SQL+so+will+not+be+linked%27) 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
نیازمندی
| مقدار | نام |
|---|---|
| >=0.59a1 | datasette |
| - | pytest |
| - | pytest-asyncio |
| - | beautifulsoup4 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl datasette-query-links-0.1.2:
pip install datasette-query-links-0.1.2.whl
نصب پکیج tar.gz datasette-query-links-0.1.2:
pip install datasette-query-links-0.1.2.tar.gz