datasette-query-history by bretwalker

100 downloads this week        Star

README source code

datasette-query-history

PyPI Changelog Tests License

Datasette plugin that keeps a list of the queries you've run and lets you rerun them.

Installation

Install this plugin in the same environment as Datasette.

$ datasette install datasette-query-history

Usage

Click the Query History button on the SQL editor page to see previous queries.
Click the ⬆︎ button to replace the current query with a previous query.
Click the Clear Query History button to clear the list previous queries.

Screenshot of plugin

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd datasette-query-history
python3 -mvenv venv
source venv/bin/activate

Or if you are using pipenv:

pipenv shell

Now install the dependencies and tests:

pip install -e '.[test]'

To run the tests:

pytest