Created
July 22, 2023 18:29
-
-
Save simonw/ccfbbf9b384a38ac7535b01849f57daf to your computer and use it in GitHub Desktop.
sqlite-utils hello world plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[project] | |
name = "sqlite-utils-hello-world" | |
version = "0.1" | |
[project.entry-points.sqlite_utils] | |
hello_world = "sqlite_utils_hello_world" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import click | |
import sqlite_utils | |
@sqlite_utils.hookimpl | |
def register_commands(cli): | |
@cli.command() | |
def hello_world(): | |
"Say hello world" | |
click.echo("Hello world!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment