sqlite-utils-ask
Ask questions of your data with LLM assistance
Installation
Install this plugin in the same environment as sqlite-utils.
sqlite-utils install sqlite-utils-ask
sqlite-utils ask
Ask questions of a SQLite database file like this:
sqlite-utils ask content.db 'How many repos?'
The tool will use an LLM (gpt-4o-mini by default) to generate the appropriate SQL query by passing through your question and the database schema, and will then execute the query and return the result.
sqlite-utils ask-files
You can also ask questions directly of CSV, TSV or JSON files. These will be imported into an in-memory SQLite database prior to running the query.
sqlite-utils ask-files data.csv 'How many repos?'
You can pass multiple files and run queries across multiple resulting tables.
sqlite-utils ask-files legislators.csv votes.csv 'How many votes did each legislator cast?'
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd sqlite-utils-ask
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
python -m pytest
To capture new HTTP interactions, run:
PYTEST_OPENAI_API_KEY=your-key python -m pytest --record-mode once
Or use --record-mode all to re-record all interactions.
Metadata
Release files for sqlite-utils-ask 0.2
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 |
|---|---|---|---|---|
| sqlite_utils_ask-0.2.tar.gz | 9.1 kB | With provenance | Details for sqlite_utils_ask-0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sqlite_utils_ask-0.2-py3-none-any.whl | Python 3 | none | any | Details for sqlite_utils_ask-0.2-py3-none-any.whl |
Total release size: 18.2 kB
Release files / sqlite_utils_ask-0.2.tar.gz
| Download URL | sqlite_utils_ask-0.2.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c53244899558fe4c777ddf53f1cf5ade1a6c641fea318f71110d97a3903686a
|
|
BLAKE2b-256 checksum How to use checksums |
33b1169a2f91c8a95dc35173c1851511449282ecc8a786feb8d6d7a977eb2f88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.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 24, 2024.
Transparency logRelease files / sqlite_utils_ask-0.2-py3-none-any.whl
| Download URL | sqlite_utils_ask-0.2-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab9fb445987e230a66361c5bbf99d9ecf8670bf3c08367f445875862f0faa01e
|
|
BLAKE2b-256 checksum How to use checksums |
5f23370b67bdfb820ecdf513f7f4861f25a551df0addcee815c5281806d2630b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.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 24, 2024.
Transparency logSecurity for sqlite-utils-ask 0.2
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
Both files in this release have been uploaded with provenance metadata.
Attestation for sqlite_utils_ask-0.2.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 24, 2024.
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.