Registry / type-stubs / types-peewee

types-peewee

JSON →
library4.0.5.20260518pypypiunverified

Typing stubs for peewee, provided by typeshed. Version 4.0.1.20260426 corresponds to peewee 4.0.1. These stubs enable static type checking for peewee projects, but they cover a subset of the runtime API and may be incomplete or incorrect for less common features. Release cadence is tied to typeshed releases.

pip install types-peewee
INSTALL
IMPORT
SIG · TYPES-PEEWEE
T
types-peewee
type-stubspythonv4.0.5.20260518
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.0.5.20260518 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SqliteDatabase
from peewee import SqliteDatabase
from peewee-stubs import SqliteDatabase

Minimal peewee usage that checks types correctly with types-peewee stubs.

import os from peewee import SqliteDatabase, Model, CharField, IntegerField # Use OS env for auth-like pattern (not needed for SQLite, just for consistency) db_path = os.environ.get('DB_PATH', ':memory:') db = SqliteDatabase(db_path) class User(Model): name = CharField() age = IntegerField() class Meta: database = db # This will pass type checks with stubs installed def get_user(name: str) -> User: return User.get(User.name == name)
Debug
Known issues
gotchaThe stubs may be incomplete: many peewee methods (especially from playhouse extensions) are not typed. You may see 'Any' or errors when using advanced features like SQLite aggregate functions, FTS, or custom fields.
fix
If you encounter missing stubs, consider adding local stub files or using # type: ignore for the affected lines.
affects: all
gotchaThe stubs version is pinned to a specific peewee release (currently 4.0.1). If you use a newer peewee version, some stubs may be out of date and cause false positives or missing type hints.
fix
Ensure your peewee version matches the stubs version. The stubs are released frequently via typeshed, so upgrade regularly.
affects: 4.0.1.20260426
deprecatedThe types-peewee package is part of the typeshed project, which may eventually be bundled into peewee itself or other distribution mechanisms. Keep an eye on peewee's own type stub support.
fix
No action needed now, but be prepared to switch to a first-party stubs package if peewee adds it.
affects: all
Upgrade
Version history
4.0.5.20260518latest on PyPI · released May 18, 2026
Audit
Dependencies
peeweerequiredtypes-peewee provides type hints for peewee; peewee must be installed at runtime.
mypyoptionalmypy is the primary type checker that consumes typeshed stubs; other checkers may also work.
Agent activity
45 hits · last 30 days
node
38
Meta
1
Amazon
1
OpenAI (training)
1
Resources
types-peewee — pip install types-peewee · libregistry