Metadata-Version: 2.1
Name: datasette-explain
Version: 0.2
Summary: Explain SQL queries executed using Datasette
Home-page: https://github.com/simonw/datasette-explain
Author: Simon Willison
License: Apache License, Version 2.0
Project-URL: Issues, https://github.com/simonw/datasette-explain/issues
Project-URL: CI, https://github.com/simonw/datasette-explain/actions
Project-URL: Changelog, https://github.com/simonw/datasette-explain/releases
Classifier: Framework :: Datasette
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: datasette
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: pytest-asyncio ; extra == 'test'

# datasette-explain

[![PyPI](https://img.shields.io/pypi/v/datasette-explain.svg)](https://pypi.org/project/datasette-explain/)
[![Changelog](https://img.shields.io/github/v/release/simonw/datasette-explain?include_prereleases&label=changelog)](https://github.com/simonw/datasette-explain/releases)
[![Tests](https://github.com/simonw/datasette-explain/workflows/Test/badge.svg)](https://github.com/simonw/datasette-explain/actions?query=workflow%3ATest)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/datasette-explain/blob/main/LICENSE)

Explain SQL queries executed using Datasette

## Installation

Install this plugin in the same environment as Datasette.

    datasette install datasette-explain

This plugin requires a Datasette 1.0 alpha or higher.

## Usage

The plugin adds JavaScript to the query editor page which will constantly update the page with information gained from running EXPLAIN QUERY PLAN queries against the entered SQL.

This may result in an error message, or it may show the query plan along with any tables used by the query.

## Development

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

    cd datasette-explain
    python3 -m venv venv
    source venv/bin/activate

Now install the dependencies and test dependencies:

    pip install -e '.[test]'

To run the tests:

    pytest
