This release is a pre-release and may not be stable for production use.
datasette-sqlite-history-json
Track changes to data using triggers and hidden JSON tables using sqlite-history-json.
Installation
Install this plugin in the same environment as Datasette.
datasette install datasette-sqlite-history-json
Usage
Install tracking on a table from Datasette's table actions menu (Enable tracking) or access the route directly:
/-/history-json/<database>/<table>/-/enable
Once enabled, the table action menu also shows:
View history→ table history page at/-/history-json/<database>/<table>Disable trackingif tracking is already active
On each row in a tracked table, the row action menu now shows:
View row history→/-/history-json/<database>/<table>/<primary-key>, with a subtitle showing the number of changes.- If the table is not tracked, or the user lacks permission, that action does not appear.
API
All endpoints return JSON for machine access and can be used in scripts:
- Table history:
/-/history-json/<database>/<table>.json - Row history:
/-/history-json/<database>/<table>/<primary-key>.json - Filter by operation:
?operation=insert|update|delete
Permissions
The plugin registers:
sqlite-history-jsonfor enabling/disabling tracking (database-level action)sqlite-history-json-viewfor viewing history (table-level action)
sqlite-history-json-view is automatically allowed in non---default-deny mode when the actor can view-table.
Required permissions by feature:
- Enable tracking:
sqlite-history-jsononDatabaseResource(database) - Disable tracking:
sqlite-history-jsononDatabaseResource(database) - View table history page/action:
sqlite-history-json-viewonTableResource(database, table)(plus the implicitview-tablecheck) - View row history action/page: same as table history permission above
In --default-deny mode, sqlite-history-json-view is not auto-granted. In that case, provide explicit grants for that action in your permission policy (and keep sqlite-history-json grants as needed for managing tracking).
Notes
<primary-key> is URL-safe, tilde-encoded values in the same format Datasette uses internally (for example comma-joined values for composite keys).
Development
To set up this plugin locally, first checkout the code. You can confirm it is available like this:
cd datasette-sqlite-history-json
# Confirm the plugin is visible
uv run datasette plugins
To run the tests:
uv run pytest
Metadata
Release files for datasette-sqlite-history-json 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_sqlite_history_json-0.1a0.tar.gz | 17.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| datasette_sqlite_history_json-0.1a0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.1 kB
Release files / datasette_sqlite_history_json-0.1a0.tar.gz
| Download URL | datasette_sqlite_history_json-0.1a0.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a7bba6b30620c0079745e8fb546deaf83285eec167de19c9426b59378124513e
|
|
BLAKE2b-256 checksum How to use checksums |
afefde322d5902e7bebfc9906cd047005ff824c52177b5af5819f99b04a1512f
|
| 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 Feb 9, 2026.
Transparency logRelease files / datasette_sqlite_history_json-0.1a0-py3-none-any.whl
| Download URL | datasette_sqlite_history_json-0.1a0-py3-none-any.whl |
|---|---|
| Size | 16.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5cb46ff662ab14d5c4135634cc52f026f4a1d3b0ff116e2b8761c17ad54254ff
|
|
BLAKE2b-256 checksum How to use checksums |
79d8216b4ca66795e33f9dde60b3f51187b345a31f4fa3d9f2512d1df23b15ae
|
| 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 Feb 9, 2026.
Transparency log