Navigation

Motor (Async Driver)

Motor (Python async) is the recommended asynchronous Python driver for MongoDB. It is compatible with Tornado and asyncio.

We recommend using pip to install Motor on all platforms:

$ pip install motor

To connect to a MongoDB Atlas cluster, use the Atlas connection string for your cluster:

import motor
client = motor.motor_tornado.MotorClient(
"mongodb+srv://<username>:<password>@<cluster-url>/test?retryWrites=true&w=majority")
db = client.test
Motor (Python async) Driver Version
MongoDB 4.4
MongoDB 4.2
MongoDB 4.0
MongoDB 3.6
MongoDB 3.4
MongoDB 3.2
MongoDB 3.0
MongoDB 2.6
2.4
2.3
2.2
2.1
2.0
1.3
1.2
1.1
1.0
  • Motor 1.3 wraps PyMongo 3.6+ and adds support for CPython 3.7
  • Motor 1.2 wraps PyMongo 3.6+
  • Motor 1.1 wraps PyMongo 3.4+
  • Motor 1.0 wraps PyMongo 3.3+

The driver does not support older versions of MongoDB.

Motor (Python async) Driver Version
Python 3.9
Python 3.8
Python 3.7
Python 3.6
Python 3.5.2
Python 3.5.0
Python 3.4
Python 3.3
Python 2.7
Python 2.6
Python 2.5
2.4
2.3
2.2
2.1
2.0
1.3
1.2
1.1
1.0
  • Motor 2.4 wraps PyMongo 3.11+
  • Motor 2.3 wraps PyMongo 3.11+
  • Motor 2.2 wraps PyMongo 3.11+
  • Motor 2.1 wraps PyMongo 3.10+
  • Motor 2.0 wraps PyMongo 3.7+
  • Motor 1.1 wraps PyMongo 3.4+
  • Motor 1.0 wraps PyMongo 3.3+
Note
  • For asyncio support, Motor requires Python 3.4+, or Python 3.3 with the asyncio package from PyPI.
  • Motor 2.3+ supports Windows.

For more information on how to read the compatibility tables, see our guide on MongoDB Compatibility Tables.

Give Feedback

On this page

  • Introduction
  • Installation
  • Connect to MongoDB Atlas
  • Compatibility
  • MongoDB Compatibility
  • Language Compatibility