Database
- Open and close connections.
- Execute queries.
- Manage transactions (and savepoints).
- Introspect tables, columns, indexes, and constraints.
from playhouse.sqlite_ext import SqliteExtDatabase
# Use SQLite (will register a REGEXP function and set busy timeout to 3s).
db = SqliteExtDatabase('/path/to/app.db', regexp_function=True, timeout=3,
from playhouse.postgres_ext import PostgresqlExtDatabase
# Use Postgres (and register hstore extension).
# Use CockroachDB.
- Postgresql Extensions
- Cockroach Database
- (encrypted SQLite database).
- apsw, an advanced sqlite driver