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

peewee extension docs

official doc on full-text search

how to use ftsmodel

Peewee包括 SQLite extension module 它提供了许多特定于sqlite的功能,例如 full-text search , json extension support 还有更多。如果您想使用这些出色的功能,请使用 SqliteExtDatabase 从 playhouse.sqlite_ext 模块:

1
2
3
4
5
6
from playhouse.sqlite_ext import SqliteExtDatabase
sqlite_db = SqliteExtDatabase('my_app.db', pragmas={
'journal_mode': 'wal', # WAL-mode.
'cache_size': -64 * 1000, # 64MB cache.
'synchronous': 0}) # Let the OS manage syncing.

enhancement proposals

enhancement for doing get/update/create at the same time

enhancement to simplify the BaseModel boilerplate code

Comments