datasette/datasette
Alex Garcia c6bbcc3298 Add add-database and remove-database lifecycle events
Fire plugin-visible events from Datasette.add_database() and
.remove_database() so plugins can react to databases being attached or
detached at runtime. Dispatch is best-effort fire-and-forget: events only
fire when startup has completed and an event loop is running, and
remove-database fires after close() so queued writes are flushed before
listeners run.

Motivating consumer is datasette-litestream, which needs to register newly
attached databases with its replication daemon.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-04 14:43:20 -07:00
..
default_permissions Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
publish Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
static Merge remote-tracking branch 'origin/main' into edit-blobs 2026-07-03 17:25:41 -07:00
templates Better permission debug tools and documentation 2026-07-14 08:40:07 -07:00
utils Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
views Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
__init__.py Merge remote-tracking branch 'origin/main' into claude/json-api-docs-1-0-review-a3e83u 2026-07-06 22:25:27 +00:00
__main__.py Add support for running datasette as a module (#556) 2019-07-11 09:07:44 -07:00
_pytest_plugin.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
actor_auth_cookie.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
app.py Add add-database and remove-database lifecycle events 2026-08-04 14:43:20 -07:00
blob_renderer.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
cli.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
column_types.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
csrf.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
database.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
default_actions.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
default_column_types.py textarea column type 2026-06-13 22:18:45 -07:00
default_database_actions.py No execute-write on immutable databases 2026-05-25 12:46:21 -07:00
default_debug_menu.py Autocomplete widget and /-/debug/autocomplete test page 2026-06-13 22:59:37 -07:00
default_jump_items.py Remove source and source_key columns from JumpSQL 2026-05-23 20:41:32 -07:00
default_magic_parameters.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
default_query_actions.py Web UI to edit and delete stored queries (#2764) 2026-06-08 20:19:47 -07:00
default_table_actions.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
events.py Add add-database and remove-database lifecycle events 2026-08-04 14:43:20 -07:00
extras.py Return 400 for unknown _extra names on data formats 2026-07-04 16:16:02 +00:00
facets.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
filters.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
fixtures.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
forbidden.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
handle_exception.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
hookspecs.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
inspect.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
jump.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
permissions.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
plugins.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
renderer.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
resources.py Rename canned queries to queries/stored queries in docs 2026-05-26 14:54:35 -07:00
sql_functions.py _search= queries now correctly escaped, fixes #651 2019-12-29 18:48:30 +00:00
stored_queries.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
template_contexts.py Clarify template context metadata names 2026-06-23 11:30:30 -07:00
tokens.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
tracer.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
url_builder.py Upgrade to ruff>=0.16.0 (#2857) 2026-07-25 15:47:08 -07:00
version.py Release 1.0a37 2026-07-14 09:28:29 -07:00
write_sql.py Support CREATE VIEW / DROP VIEW in execute-write-sql 2026-07-02 08:56:04 -07:00