-
-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
startup() plugin hook #834
Comments
Another use-case for this: I want to use the |
This should be able to optionally return an async function which is then awaited. |
Another use-case: plugins that need their own database with the correct tables. They can write to the database on startup to create their tables. |
Implementing this is proving surprisingly tricky, because of the need to be able to optionally Lines 115 to 133 in b906030
I could switch to using |
I have two plugins in progress that use this hook now:
|
It might be useful to have an
startup
hook which gets passed thedatasette
object as soon as Datasette has finished initializing.My initial use-case for this is configuration verification - checking that the
"plugins"
configuration block for this plugin contains valid details.I imagine there are plenty of other potential uses for this as well.
The text was updated successfully, but these errors were encountered: