Log Datasette events to a database table
Project description
datasette-events-db
Log Datasette events to a database table
Installation
Install this plugin in the same environment as Datasette.
datasette install datasette-events-db
This plugin depends on Datasette 1.0a8 or higher.
Usage
Once installed, all Datasette events will be logged to a table called datasette_events. This table will be created in the _internal database, but can be moved to another database using the following plugin configuration option:
plugins:
datasette-events-db:
database: my_database
The table will be created when Datasette starts up, if it does not already exist.
Table schema
create table if not exists datasette_events (
id integer primary key,
event text,
created text,
actor_id text,
database_name text,
table_name text,
properties text -- JSON other properties
)
eventis the text name of the event, for examplecreate-tablecreatedis an ISO formatted UTC timestampactor_idwill be populated with the ID of the responsible actor, ornullif not availabledatabase_namewill be thedatabaseproperty recorded by the event, if presenttable_namewill be thetableproperty recorded by the event, if presentpropertieswill be a JSON object containing any other properties recorded by the event
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-events-db
python3 -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
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 datasette_events_db-0.1a1.tar.gz.
File metadata
- Download URL: datasette_events_db-0.1a1.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac8507793dd75745371443c97569bf0de7d1c9e0f787376a4d57baf31ec49424
|
|
| MD5 |
423b30619859232ca9294462ad7d0ffc
|
|
| BLAKE2b-256 |
b7073f8da60a88eb2e0b31bb49e0388f521b387e1bbed3df1b0eb0e709d0cfa0
|
Provenance
The following attestation bundles were made for datasette_events_db-0.1a1.tar.gz:
Publisher:
publish.yml on datasette/datasette-events-db
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datasette_events_db-0.1a1.tar.gz -
Subject digest:
ac8507793dd75745371443c97569bf0de7d1c9e0f787376a4d57baf31ec49424 - Sigstore transparency entry: 628747890
- Sigstore integration time:
-
Permalink:
datasette/datasette-events-db@fe091bff8a9f58b79268992a1a790d217149cffa -
Branch / Tag:
refs/tags/0.1a1 - Owner: https://github.com/datasette
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fe091bff8a9f58b79268992a1a790d217149cffa -
Trigger Event:
release
-
Statement type:
File details
Details for the file datasette_events_db-0.1a1-py3-none-any.whl.
File metadata
- Download URL: datasette_events_db-0.1a1-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a81765ee6fb8ac255a7f74862223fa4a650c026c89b3d3a4851546e976fe983f
|
|
| MD5 |
41cafdc262f19fa88c34db65c2796e4a
|
|
| BLAKE2b-256 |
0fcf3098c8dc358e2bf622b35de8ac1f2d5c988c741356a242b9917e16a04120
|
Provenance
The following attestation bundles were made for datasette_events_db-0.1a1-py3-none-any.whl:
Publisher:
publish.yml on datasette/datasette-events-db
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datasette_events_db-0.1a1-py3-none-any.whl -
Subject digest:
a81765ee6fb8ac255a7f74862223fa4a650c026c89b3d3a4851546e976fe983f - Sigstore transparency entry: 628747893
- Sigstore integration time:
-
Permalink:
datasette/datasette-events-db@fe091bff8a9f58b79268992a1a790d217149cffa -
Branch / Tag:
refs/tags/0.1a1 - Owner: https://github.com/datasette
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fe091bff8a9f58b79268992a1a790d217149cffa -
Trigger Event:
release
-
Statement type: