This release is a pre-release and may not be stable for production use.
datasette-query-assistant
Query databases and tables with AI assistance
Early alpha.
Installation
Install this plugin in the same environment as Datasette.
datasette install datasette-query-assistant
Configuration
Set the model ID to be used by this plugin by adding this to your Datasette configuration:
plugins:
datasette-query-assistant:
model: openai/gpt-4.1-mini
key_env_var: OPENAI_API_KEY
To use the openai/gpt-4.1-mini model you'll need to install llm-openai-plugin in addition to datasette-query-assistant.
If the model needs an API key, set the key_env_var to the name of an environment variable and ensure that environment variable is correctly set.
You can use any model that is available via an LLM plugin
Usage
Users with execute-sql permission will gain a database action menu item for "Query this database with AI assistance" which will let them ask a question and be redirected to a commented SQL query that will hopefully answer it.
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-query-assistant
python3 -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
To re-generate the tests with refreshed examples from the API:
pytest -x --record-mode=rewrite --inline-snapshot=fix
Metadata
Release files for datasette-query-assistant 0.1a5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| datasette_query_assistant-0.1a5.tar.gz | 11.3 kB | With provenance | Details for datasette_query_assistant-0.1a5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| datasette_query_assistant-0.1a5-py3-none-any.whl | Python 3 | none | any | Details for datasette_query_assistant-0.1a5-py3-none-any.whl |
Total release size: 22.7 kB
Release files / datasette_query_assistant-0.1a5.tar.gz
| Download URL | datasette_query_assistant-0.1a5.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f3c871ab23cbd77c2cc2953a0614db6d31aee57a6921f8c0f3a1e75a4b89b14
|
|
BLAKE2b-256 checksum How to use checksums |
551bd7eb6671f13b272227670ab2ad8fb948cdc2a0f08e561f621da303dba504
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2025.
Transparency logRelease files / datasette_query_assistant-0.1a5-py3-none-any.whl
| Download URL | datasette_query_assistant-0.1a5-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
354a248c05b774f074140c9abcd838fb1b20d83a9cf8f3861008578bdaa174db
|
|
BLAKE2b-256 checksum How to use checksums |
3de5dd67c760f1e02061a8dd9e24033c5c8f345644e990bd5d44b8628bf6b535
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2025.
Transparency logSecurity for datasette-query-assistant 0.1a5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for datasette_query_assistant-0.1a5.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.