--- id: motor-types version: "1.0.0b4" license: MIT license_treatment: permissive maintenance: abandoned --- # motor-types — Python stubs for Motor, a Non-Blocking MongoDB driver for Python's Tornado and AsyncIO based applications. License: permissive · Maintenance: abandoned · Downloads: 127.7K/mo ## 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 above — 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 pip install motor-types uv add motor-types 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_current - Install friction: low - Maintenance: abandoned - Downloads: 127.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags motor type stubs, mongodb asyncio type hints, motor typing support, python motor stubs, motor mypy support, motor pycharm autocomplete, motor static type checking, type-stubs, mongodb, asyncio [View on SkillFed](https://skillfed.io/packages/motor-types) · [View on PyPI](https://pypi.org/project/motor-types/)