skillfed

motor-types

Python stubs for Motor, a Non-Blocking MongoDB driver for Python's Tornado and AsyncIO based applications.

motor-types v1.0.0b4 127.7K downloads/30d#11,732 on PyPI20
Permissive license MIT Abandoned released

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-types

uv

uv add motor-types

poetry

poetry add motor-types

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Text EditorsTopic :: UtilitiesTyping :: Stubs Only

Tags

motor type stubsmongodb asyncio type hintsmotor typing supportpython motor stubsmotor mypy supportmotor pycharm autocompletemotor static type checking
type-stubsmongodbasyncio

More Utilities packages