Added asgi_wrapper plugin hook, closes #520

This commit is contained in:
Simon Willison 2019-07-02 20:57:28 -07:00
commit 4d2fdafe39
5 changed files with 78 additions and 1 deletions

View file

@ -5,6 +5,11 @@ hookspec = HookspecMarker("datasette")
hookimpl = HookimplMarker("datasette")
@hookspec
def asgi_wrapper(datasette):
"Returns an ASGI middleware callable to wrap our ASGI application with"
@hookspec
def prepare_connection(conn):
"Modify SQLite connection in some way e.g. register custom SQL functions"