Skip to content

Instantly share code, notes, and snippets.

@Checksum
Created April 29, 2024 08:35
Show Gist options
  • Save Checksum/1782bebcde5803f8acead28bb22504f2 to your computer and use it in GitHub Desktop.
Save Checksum/1782bebcde5803f8acead28bb22504f2 to your computer and use it in GitHub Desktop.
peewee sqlite
from playhouse.sqliteq import SqliteQueueDatabase
db = SqliteQueueDatabase(
"products.db",
autostart=True,
pragmas={
"journal_mode": "wal",
"cache_size": -1024 * 32,
"foreign_keys": 1,
"ignore_check_constraints": 0,
"synchronous": 1,
"temp_store": 2,
},
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment