Query databases and tables with AI assistance
Project description
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
This plugin currently requires you to set the ANTHROPIC_API_KEY
environment variable to a working Anthropic API key.
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 SQL 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 Claude 3 API:
pytest -x --record-mode=rewrite --inline-snapshot=fix
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for datasette_query_assistant-0.1a2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0072d1c3e048443c48a8e0d9a1c33d71581530831c34f4a8c9d04f0da3a30808 |
|
MD5 | 81118c376cb3d7f284da73e88bf3ab7b |
|
BLAKE2b-256 | d268b34e3cabf3260c7da7d33bce79806ee333310562b9dc1718e7ce8a536325 |
Hashes for datasette_query_assistant-0.1a2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9556cd6a649561caaf03464297bb1a5dbb9ec838e35083343609fe1b2325c89 |
|
MD5 | 6f9462e0b85fd87d74595c6ece567e5d |
|
BLAKE2b-256 | a43c0da9303793c8def306e9e34277161637957f1617f736488aac1c60fcdd1c |