pypi_packages: datasette-query-links
This data as json
name | summary | classifiers | description | author | author_email | description_content_type | home_page | keywords | license | maintainer | maintainer_email | package_url | platform | project_url | project_urls | release_url | requires_dist | requires_python | version | yanked | yanked_reason |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
datasette-query-links | Turn SELECT queries returned by a query into links to execute them | [] | # 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 | Simon Willison | text/markdown | https://github.com/simonw/datasette-query-links | Apache License, Version 2.0 | https://pypi.org/project/datasette-query-links/ | https://pypi.org/project/datasette-query-links/ | {"CI": "https://github.com/simonw/datasette-query-links/actions", "Changelog": "https://github.com/simonw/datasette-query-links/releases", "Homepage": "https://github.com/simonw/datasette-query-links", "Issues": "https://github.com/simonw/datasette-query-links/issues"} | https://pypi.org/project/datasette-query-links/0.1.2/ | ["datasette (>=0.59a1)", "pytest ; extra == 'test'", "pytest-asyncio ; extra == 'test'", "beautifulsoup4 ; extra == 'test'"] | >=3.6 | 0.1.2 | 0 |