Simplified example

This commit is contained in:
Simon Willison 2022-01-30 07:24:13 -08:00 committed by GitHub
commit a6da26a856
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -441,7 +441,7 @@ The easiest way to create a new table is to insert a record into it:
from sqlite_utils import Database
import sqlite3
db = Database(sqlite3.connect("/tmp/dogs.db"))
db = Database("dogs.db")
dogs = db["dogs"]
dogs.insert({
"name": "Cleo",