motor-types
Python stubs for Motor, a Non-Blocking MongoDB driver for Python's Tornado and AsyncIO based applications.
What it is and what it does
Motor-Types is a stub package that adds type hints to Motor, the non-blocking MongoDB driver for AsyncIO applications. It works by installing `.pyi` type definition files alongside Motor in your Python environment, allowing static type checkers like mypy and IDEs like PyCharm to understand Motor's API and provide accurate autocompletion and type validation.
The package depends on pymongo and typing-extensions at runtime. It targets Python 3.8 through 3.12 and is classified as Beta. Currently only AsyncIO stubs are supported; Tornado support is incomplete. The project is unofficial and unaffiliated with MongoDB.
Use it for:
- Enable mypy type-checking in AsyncIO-based MongoDB applications using Motor without runtime overhead
- Improve IDE autocompletion and inline documentation for Motor API calls in PyCharm or similar editors
- Catch type errors in Motor queries and operations during development rather than at runtime
- Provide type hints for team members working with Motor-based async codebases
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Python type stubs for Motor, enabling static type-checking and IDE autocompletion for Motor's AsyncIO-based MongoDB driver without runtime overhead.
Yes, if you are actively using Motor with AsyncIO and need type-checking support—the low install friction and permissive license make adoption straightforward. However, be aware the project is abandoned and may not track Motor API changes beyond version 3.0.0+. For new projects or those requiring long-term maintenance guarantees, verify that the stubs align with your Motor version before committing.
Install
motor-types on PyPI
pip
pip install motor-typesuv
uv add motor-typespoetry
poetry add motor-typesInstalling motor-types
Before you install
Low install friction with only two runtime dependencies (pymongo and typing-extensions). However, the package is abandoned as of 2024-03-21 with no recent maintenance, which may limit compatibility with future Motor or Python releases.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it safe to integrate into most projects.
Quickstart
pip install motor-types
Then in your code, import Motor normally:
import motor.motor_asyncio
Static type checkers like mypy and IDEs like PyCharm will now provide type hints and autocompletion.
Requires Motor version 3.0.0 or later; currently only AsyncIO stubs are supported, not Tornado.
Verify before relying
- Whether stubs remain compatible with Motor versions released after the last commit in March 2024
- Coverage completeness for Motor's AsyncIO API surface beyond what the description indicates
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8.0,<4.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — pymongo, typing-extensions |
| Maintenance | abandoned — 966 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 127,740/month — #11,732 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: motor_types-1.0.0b4-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
motorMotor provides a non-blocking MongoDB driver…
permissive · top 5,000 on PyPI
mongomock-motorProvides an async mock client for MongoDB that…
permissive · top 5,000 on PyPI
types-tornadoProvides PEP 561 type stubs for tornado,…
permissive · top 15,000 on PyPI
asyncpg-stubsProvides type stubs for asyncpg to enable…
permissive · top 5,000 on PyPI
types-PyJWTProvides type stubs for PyJWT to enable static…
permissive · top 15,000 on PyPI
types-FlaskProvides PEP 561 type stubs for Flask to enable…
permissive · top 5,000 on PyPI
types-atomicwritesProvides type stubs for the atomicwrites…
permissive · top 15,000 on PyPI
types-clickProvides PEP 561 type stubs for the click…
permissive · top 5,000 on PyPI
types-Flask-SQLAlchemyProvides type stubs for Flask-SQLAlchemy to…
permissive · top 15,000 on PyPI
types-PyMySQLProvides type stubs for PyMySQL to enable…
permissive · top 5,000 on PyPI