mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
track_event() mechanism for analytics and plugins
* Closes #2240 * Documentation for event plugin hooks, refs #2240 * Include example track_event plugin in docs, refs #2240 * Tests for track_event() and register_events() hooks, refs #2240 * Initial documentation for core events, refs #2240 * Internals documentation for datasette.track_event()
This commit is contained in:
parent
890615b3f2
commit
bcc4f6bf1f
22 changed files with 614 additions and 10 deletions
14
docs/events.rst
Normal file
14
docs/events.rst
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
.. _events:
|
||||
|
||||
Events
|
||||
======
|
||||
|
||||
Datasette includes a mechanism for tracking events that occur while the software is running. This is primarily intended to be used by plugins, which can both trigger events and listen for events.
|
||||
|
||||
The core Datasette application triggers events when certain things happen. This page describes those events.
|
||||
|
||||
Plugins can listen for events using the :ref:`plugin_hook_track_event` plugin hook, which will be called with instances of the following classes (or additional classes registered by other plugins):
|
||||
|
||||
.. automodule:: datasette.events
|
||||
:members:
|
||||
:exclude-members: Event
|
||||
Loading…
Add table
Add a link
Reference in a new issue