Peewee Related Notes
Peewee
SQLite ORM
Full-text search
JSON support
Get/update/create actions
BaseModel boilerplate code
Enhancements
Peewee is an SQLite ORM that offers advanced features like full-text search and JSON support. It also proposes enhancements for get/update/create actions and aims to simplify BaseModel boilerplate code, making it a powerful tool for database operations.
extensions
full-text search
official doc on full-text search
Peewee包括 SQLite extension module 它提供了许多特定于sqlite的功能,例如 full-text search , json extension support 还有更多。如果您想使用这些出色的功能,请使用 SqliteExtDatabase 从 playhouse.sqlite_ext 模块:
from playhouse.sqlite_ext import SqliteExtDatabase
= SqliteExtDatabase('my_app.db', pragmas={
sqlite_db 'journal_mode': 'wal', # WAL-mode.
'cache_size': -64 * 1000, # 64MB cache.
'synchronous': 0}) # Let the OS manage syncing.