LLM tools for running queries against SQLite
Project description
llm-tools-sqlite
LLM tools for running queries against SQLite
Installation
Install this plugin in the same environment as LLM.
llm install llm-tools-sqlite
Usage
To use this with the LLM command-line tool:
llm -T 'SQLite("content.db")' \
"Count rows in the most interesting looking table" --td
Or use llm chat to chat with your database over multiple rounds:
llm chat -T 'SQLite("content.db")'
This tool currently only supports read-only queries. Attempts to write to the database will fail with an error.
With the LLM Python API:
import llm
from llm_tools_sqlite import SQLite
model = llm.get_model("gpt-4.1-mini")
result = model.chain(
"Show me the three most interesting looking tables",
tools=[SQLite("content.db")]
)
for s in result:
print(s, end="", flush=True)
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd llm-tools-sqlite
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
llm install -e '.[test]'
To run the tests:
python -m pytest
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llm_tools_sqlite-0.1.tar.gz.
File metadata
- Download URL: llm_tools_sqlite-0.1.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7e23f8bda244af93fc52f336297a4a65dae49438d853fe32529daceaa3b24a5
|
|
| MD5 |
6ba931dfe176377463c9d123f6dc8ecf
|
|
| BLAKE2b-256 |
ad9773c7ebc83335cd2d27345efa88194a9af56279816541626e4b969e9904ce
|
Provenance
The following attestation bundles were made for llm_tools_sqlite-0.1.tar.gz:
Publisher:
publish.yml on simonw/llm-tools-sqlite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llm_tools_sqlite-0.1.tar.gz -
Subject digest:
b7e23f8bda244af93fc52f336297a4a65dae49438d853fe32529daceaa3b24a5 - Sigstore transparency entry: 221039509
- Sigstore integration time:
-
Permalink:
simonw/llm-tools-sqlite@c8b177dfdea04055d7b5583fbfba25ba76622f7a -
Branch / Tag:
refs/tags/0.1 - Owner: https://github.com/simonw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c8b177dfdea04055d7b5583fbfba25ba76622f7a -
Trigger Event:
release
-
Statement type:
File details
Details for the file llm_tools_sqlite-0.1-py3-none-any.whl.
File metadata
- Download URL: llm_tools_sqlite-0.1-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d46dfa368ea80ae2f21a0df63400e39adaa17a23770f75b1cd245b0a698048dc
|
|
| MD5 |
fbbfca4f304e6cefbaa9396dd9f3423b
|
|
| BLAKE2b-256 |
f8d678da51dcc803b28802fbaafd562afa0c1942d370796e3a2523fd38de4820
|
Provenance
The following attestation bundles were made for llm_tools_sqlite-0.1-py3-none-any.whl:
Publisher:
publish.yml on simonw/llm-tools-sqlite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llm_tools_sqlite-0.1-py3-none-any.whl -
Subject digest:
d46dfa368ea80ae2f21a0df63400e39adaa17a23770f75b1cd245b0a698048dc - Sigstore transparency entry: 221039527
- Sigstore integration time:
-
Permalink:
simonw/llm-tools-sqlite@c8b177dfdea04055d7b5583fbfba25ba76622f7a -
Branch / Tag:
refs/tags/0.1 - Owner: https://github.com/simonw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c8b177dfdea04055d7b5583fbfba25ba76622f7a -
Trigger Event:
release
-
Statement type: