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) DriverMongoDB 4.4MongoDB 4.2MongoDB 4.0MongoDB 3.6MongoDB 3.4MongoDB 3.2MongoDB 3.0MongoDB 2.6
2.1
2.0
1.3
1.2
1.1
1.0
0.7
0.6
0.5
0.4
0.3
0.2
  • 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+
  • Motor 0.7 wraps PyMongo >=2.9.4 and <3.0
  • Motor 0.6 wraps PyMongo 2.8
  • Motor 0.5 wraps PyMongo 2.8
  • Motor 0.4 wraps PyMongo 2.8
  • Motor 0.3 wraps PyMongo 2.7.1
  • Motor 0.2 wraps PyMongo 2.7.0

The driver does not support older versions of MongoDB.

Motor (Python async) DriverPython 2.5Python 2.6Python 2.7Python 3.3Python 3.4Python 3.5Python 3.6
1.2
1.1
1.0
0.7
0.6
0.5
0.4
0.3
0.2
0.1
  • Motor 1.1 wraps PyMongo 3.4+
  • Motor 1.0 wraps PyMongo 3.3+
  • Motor 0.7 wraps PyMongo >=2.9.4 and <3.0
  • Motor 0.6 wraps PyMongo 2.8
  • Motor 0.5 wraps PyMongo 2.8
  • Motor 0.4 wraps PyMongo 2.8
  • Motor 0.3 wraps PyMongo 2.7.1
  • Motor 0.2 wraps PyMongo 2.7.0
  • Motor 0.1 wraps PyMongo 2.5.0
Info With Circle IconCreated with Sketch.Note
  • Motor version 0.5 and earlier requires Tornado, and supports the same version of Python as its supported Tornado versions do.
  • For asyncio support, Motor requires Python 3.4+, or Python 3.3 with the asyncio package from PyPI.
  • PyPy is not supported as it runs Motor code slowly.
  • Motor does not support Jython or Windows.

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

Give Feedback