New "startup" plugin hook, closes #834

This commit is contained in:
Simon Willison 2020-06-13 10:55:41 -07:00
commit 09a3479a54
8 changed files with 61 additions and 0 deletions

View file

@ -5,6 +5,11 @@ hookspec = HookspecMarker("datasette")
hookimpl = HookimplMarker("datasette")
@hookspec
def startup(datasette):
"Fires directly after Datasette first starts running"
@hookspec
def asgi_wrapper(datasette):
"Returns an ASGI middleware callable to wrap our ASGI application with"