-
-
Save asg017/d7cdf0d56e2be87efda28cebee27fa3c 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.2" | |
[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 sqlite_utils | |
@sqlite_utils.hookimpl | |
def prepare_connection(conn): | |
conn.create_function( | |
"hello", 1, lambda name: f"Hello, {name}!" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment