skillfed

motor

Non-blocking MongoDB driver for Tornado or asyncio

motor v3.7.1 11.5M downloads/30d#1,389 on PyPI2,527
Permissive license Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) Active released

What it is and what it does

Motor is a non-blocking MongoDB driver designed for Python asyncio and Tornado applications. It wraps pymongo (>=4.9,<5) to provide a coroutine-based API that allows your application to query MongoDB without blocking the event loop, enabling efficient handling of concurrent requests. Motor is used in high-throughput environments where blocking I/O would degrade performance; it lets you scale horizontally by fully utilizing available CPU cores.

The package requires Python 3.9+ and works on Unix (including macOS) and Windows. It has a single runtime dependency on pymongo and offers optional extras for features like GSSAPI authentication, AWS authentication, mongodb+srv:// URIs, OCSP, and wire protocol compression. However, Motor is entering end-of-life: it will be deprecated on May 14th, 2026, with critical bug fixes only until May 14th, 2027. MongoDB recommends migrating to the PyMongo Async driver for new projects.

Use it for:

  • Building high-throughput web services with asyncio or Tornado that need concurrent MongoDB access without blocking.
  • Sensor systems and IoT applications requiring massively scalable database operations across many concurrent connections.
  • Real-time data processing pipelines that must handle thousands of requests per second while maintaining responsive event loops.
  • Microservices using async frameworks that need non-blocking database queries.
  • Applications requiring GSSAPI or AWS authentication to MongoDB with async/await syntax.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Motor provides a non-blocking MongoDB driver for asyncio and Tornado applications, presenting a coroutine-based API for concurrent database access without blocking the event loop.

Yes, but with a critical caveat: Motor is actively maintained and production-stable, with low install friction and permissive licensing. However, it is scheduled for deprecation on May 14th, 2026, with MongoDB strongly recommending migration to the PyMongo Async driver. Install Motor only if you have an existing Motor codebase or a clear migration plan; for new projects, evaluate the PyMongo Async driver instead.

Install

motor on PyPI

pip

pip install motor

uv

uv add motor

poetry

poetry add motor

Installing motor

Before you install

Low install friction with a single runtime dependency (pymongo). Active maintenance as of August 2026, though Motor is scheduled for deprecation on May 14th, 2026, with critical bug fixes until May 14th, 2027—users should plan migration to the PyMongo Async driver.

License in practice

Apache License 2.0 is permissive; you may use, modify, and distribute Motor freely in commercial and open-source projects, provided you include license and copyright notices.

Quickstart

pip install motor

import motor.motor_asyncio

client = motor.motor_asyncio.AsyncIOMotorClient()
db = client.test_database
collection = db.test_collection

# Use in an async context
await collection.insert_one({'name': 'example'})

Requires Python 3.9+; must be used within an asyncio event loop or Tornado application context.

Verify before relying

  • Performance characteristics and throughput limits in production environments beyond the quoted use cases.
  • Compatibility matrix details with specific asyncio and Tornado versions.
  • Migration path complexity and effort for existing Motor applications moving to PyMongo Async driver.

Package facts

License Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 1 — pymongo
Maintenance actively maintained — 457 days since the last release
Last repo commit
First released
Downloads 11,494,607/month — #1,389 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: motor-3.7.1-py3-none-any.whl

Keywords: asyncio, bson, gridfs, mongo, mongodb, motor, pymongo, tornado

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTyping :: Typed

Tags

async mongodb drivernon-blocking mongo asynciotornado mongodb drivercoroutine-based database accessmongodb asyncio clientevent-loop mongodbasync database driver
async-iomongodbdeprecated-planned

More Database packages