This release is a pre-release and may not be stable for production use.
datasette-demo-for-llm-accountant
Demo app for LLM accountant
This is a demonstration plugin showing how to use datasette-llm-accountant to track and log LLM API costs.
Features
- Interactive LLM Form: Submit prompts to any available LLM model via a web interface
- Cost Tracking: All LLM API calls are tracked with nanocent precision
- Transaction Log: View a running total of all LLM requests and their costs
- In-Memory Accountant: Demonstrates implementing a custom
Accountantsubclass
Installation
Install this plugin in the same environment as Datasette.
datasette install datasette-demo-for-llm-accountant
Usage
Once installed, navigate to /-/llm-accountant in your Datasette instance.
You'll see:
- A form to select an LLM model and enter a prompt
- The response from the LLM
- A transaction log showing all requests and their costs
Each request reserves $0.50 by default, and the actual cost is calculated based on token usage and settled in the transaction log.
Running Locally
datasette
Then visit http://127.0.0.1:8001/-/llm-accountant
Note: You'll need LLM API keys configured for this to work. See the llm documentation for details on configuring API keys.
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-demo-for-llm-accountant
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
Metadata
Release files for datasette-demo-for-llm-accountant 0.1a0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| datasette_demo_for_llm_accountant-0.1a0.tar.gz | 9.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| datasette_demo_for_llm_accountant-0.1a0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.6 kB
Release files / datasette_demo_for_llm_accountant-0.1a0.tar.gz
| Download URL | datasette_demo_for_llm_accountant-0.1a0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
71ac827b6149daecaaf8f99a6dc73ef9b5a800e8f69e6aa927400d5dd14d658d
|
|
BLAKE2b-256 checksum How to use checksums |
eb50ace62fce19144e1ee958f92062f2985edf73503dd8ef16a431a84871c533
|
| 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 18, 2025.
Transparency logRelease files / datasette_demo_for_llm_accountant-0.1a0-py3-none-any.whl
| Download URL | datasette_demo_for_llm_accountant-0.1a0-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b48f31a82fc58a62cacbf2ec19cced1ccdb081466c5cd81a9968cf6be2e486b8
|
|
BLAKE2b-256 checksum How to use checksums |
36189d4ed2fe49e9f02633d94d1e5643eabc617f8234c5a9423c14d8e56a94e6
|
| 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 18, 2025.
Transparency log