Registry / type-stubs / motor-types

motor-types

JSON →
library1.0.0b4pypypiunverified

Third-party PEP 561 type stubs for Motor, the async MongoDB driver for Tornado and AsyncIO. Current version 1.0.0b4 (pre-release). Alpha-level coverage; many symbols still untyped. Cadence: infrequent.

pip install motor-types
INSTALL
IMPORT
SIG · MOTOR-TYPES
M
motor-types
type-stubspythonv1.0.0b4
Install
2.7s avg
Import
Disk
26MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.0b4 · 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 · 26.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.7s · import 0.000s · 28MB
26MB installed
● package 26MB
Code
Verified usage

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

AsyncIOMotorClient
from motor-stubs.motor_asyncio import AsyncIOMotorClient
from motor.motor_asyncio import AsyncIOMotorClient

Basic create, insert, query with Motor (quickstart for the driver, not stubs). motor-types provides the type hints.

import asyncio from motor.motor_asyncio import AsyncIOMotorClient async def main(): client = AsyncIOMotorClient('mongodb://localhost:27017') db = client.test_database collection = db.test_collection await collection.insert_one({'x': 1}) doc = await collection.find_one({'x': 1}) print(doc) asyncio.run(main())
Debug
Known issues
deprecatedmotor-types is in pre-release (beta). Do not use in production for type-checking; many stubs are incomplete or missing.
fix
Pin to 1.0.0b4 and test coverage before relying on stubs. Expect frequent breaking changes.
affects: <1.0.0
gotchamotor-types provides stubs only. Do not import anything from it; always import from `motor.motor_asyncio` or `motor.motor_tornado`.
fix
Use `from motor.motor_asyncio import AsyncIOMotorClient` as usual.
affects: all
gotchaStubs may not cover all Motor classes and methods. You may see 'cannot find reference' errors in your IDE for some functions.
fix
Install the latest version; if missing, report to GitHub or add your own stubs.
affects: <=1.0.0b4
Upgrade
Version history
1.0.0b4latest on PyPI · released Dec 22, 2023
Audit
Dependencies

No dependency data recorded yet.

Agent activity
38 hits · last 30 days
node
37
OpenAI (training)
1
Resources