Added pluggy and first hook, register_commands - refs #569, #567

This commit is contained in:
Simon Willison 2023-07-22 12:04:31 -07:00
commit b379a2a0c3
11 changed files with 224 additions and 2 deletions

10
sqlite_utils/hookspecs.py Normal file
View file

@ -0,0 +1,10 @@
from pluggy import HookimplMarker
from pluggy import HookspecMarker
hookspec = HookspecMarker("sqlite_utils")
hookimpl = HookimplMarker("sqlite_utils")
@hookspec
def register_commands(cli):
"""Register additional CLI commands, e.g. 'sqlite-utils mycommand ...'"""