datasette-create-view by datasette
44 downloads this week Star
README source code
Create a SQL view from a query
Install this plugin in the same environment as Datasette.
datasette install datasette-create-view
This plugin requires Datasette 1.0a12 or later.
Users with the create-table
permission will get a new menu item on the query results page offering to save the query as a view.
This option will only show for SQL queries that do not use :named
parameters.
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-create-view
python3 -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest