Skip to content

Commit b9b33cf

Browse files
committed
Restore files
1 parent eb9693d commit b9b33cf

File tree

4 files changed

+320
-0
lines changed

4 files changed

+320
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
How to get help
2+
---------------
3+
4+
- Ask questions on our :community-forum:`MongoDB Community Forums <>`.
5+
- Visit our :technical-support:`Support Channels </>`.
6+
- See `JIRA <https://jira.mongodb.org/projects/MOTOR/summary>`__ to raise issues or request features.
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
2+
.. list-table::
3+
:header-rows: 1
4+
:stub-columns: 1
5+
:class: compatibility-large
6+
7+
* - Motor Driver Version
8+
- Python 3.13
9+
- Python 3.12
10+
- Python 3.11
11+
- Python 3.10
12+
- Python 3.9
13+
- Python 3.8
14+
- Python 3.7
15+
16+
* - 3.7
17+
- ✓
18+
- ✓
19+
- ✓
20+
- ✓
21+
- ✓
22+
-
23+
-
24+
25+
* - 3.6
26+
- ✓
27+
- ✓
28+
- ✓
29+
- ✓
30+
- ✓
31+
- ✓
32+
-
33+
34+
* - 3.5
35+
-
36+
- ✓
37+
- ✓
38+
- ✓
39+
- ✓
40+
- ✓
41+
-
42+
43+
* - 3.3 to 3.4
44+
-
45+
- ✓
46+
- ✓
47+
- ✓
48+
- ✓
49+
- ✓
50+
- ✓
51+
52+
* - 3.1 to 3.2
53+
-
54+
-
55+
- ✓
56+
- ✓
57+
- ✓
58+
- ✓
59+
- ✓
60+
61+
* - 3.0
62+
-
63+
-
64+
-
65+
- ✓
66+
- ✓
67+
- ✓
68+
- ✓
69+
70+
- Motor 3.7 wraps PyMongo 4.10
71+
- Motor 3.6 wraps PyMongo 4.9
72+
- Motor 3.5 wraps PyMongo 4.5 to 4.8
73+
- Motor 3.3 and 3.4 wrap PyMongo 4.5
74+
- Motor 3.2 wraps PyMongo 4.4+
75+
- Motor 3.1 wraps PyMongo 4.2+
76+
- Motor 3.0 wraps PyMongo 4.1+
77+
78+
.. note::
79+
80+
- For asyncio support, Motor requires Python 3.4+, or
81+
Python 3.3 with the `asyncio package from PyPI
82+
<https://pypi.python.org/pypi/asyncio>`_.
83+
84+
- Motor 2.3+ supports Windows.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
.. sharedinclude:: dbx/compatibility-table-legend.rst
2+
3+
.. list-table::
4+
:header-rows: 1
5+
:stub-columns: 1
6+
:class: compatibility
7+
8+
* - Motor Driver Version
9+
- MongoDB 8.0
10+
- MongoDB 7.0
11+
- MongoDB 6.0
12+
- MongoDB 5.0
13+
- MongoDB 4.4
14+
- MongoDB 4.2
15+
- MongoDB 4.0
16+
- MongoDB 3.6
17+
18+
* - 3.7
19+
- ✓
20+
- ✓
21+
- ✓
22+
- ✓
23+
- ✓
24+
- ✓
25+
- ✓
26+
-
27+
* - 3.6
28+
- ✓
29+
- ✓
30+
- ✓
31+
- ✓
32+
- ✓
33+
- ✓
34+
- ✓
35+
- ✓
36+
* - 3.2 to 3.5
37+
- ⊛
38+
- ✓
39+
- ✓
40+
- ✓
41+
- ✓
42+
- ✓
43+
- ✓
44+
- ✓
45+
* - 3.1
46+
- ⊛
47+
- ⊛
48+
- ✓
49+
- ✓
50+
- ✓
51+
- ✓
52+
- ✓
53+
- ✓
54+
* - 3.0
55+
- ⊛
56+
- ⊛
57+
- ⊛
58+
- ✓
59+
- ✓
60+
- ✓
61+
- ✓
62+
- ✓

source/motor.txt

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
.. _python-async-driver:
2+
3+
====================
4+
Motor (Async Driver)
5+
====================
6+
7+
.. facet::
8+
:name: genre
9+
:values: reference
10+
11+
.. facet::
12+
:name: programming_language
13+
:values: python
14+
15+
.. meta::
16+
:keywords: Python async, Stable API, local connection, atlas, code example
17+
:description: Explore Motor, the async Python driver for MongoDB, with installation guides, connection examples, and compatibility details.
18+
19+
.. contents:: On this page
20+
:local:
21+
:backlinks: none
22+
:depth: 1
23+
:class: twocols
24+
25+
.. banner::
26+
:variant: warning
27+
28+
As of May 14, 2025, Motor is deprecated in favor of the GA release of the PyMongo Async
29+
API in the PyMongo library. We will not add new features to Motor, and we will
30+
provide only bug fixes until it reaches end of life on May 14, 2026. After that, we will
31+
fix only critical bugs until final support ends on May 14, 2027. We
32+
strongly recommend migrating to the PyMongo Async API while Motor is still supported.
33+
34+
For more information about migrating, see the `Migrate to PyMongo Async <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/reference/migration/>`__
35+
guide in the PyMongo documentation.
36+
37+
38+
Introduction
39+
------------
40+
41+
Welcome to the documentation site for Motor, the official MongoDB
42+
driver for asynchronous Python applications. Download it using
43+
`pip <https://pypi.python.org/pypi/pip>`__
44+
or set up a runnable project by following our tutorials.
45+
46+
.. tip::
47+
48+
If you do not need to access MongoDB in a non-blocking manner or from
49+
co-routines, we recommend that you use the `PyMongo
50+
<https://www.mongodb.com/docs/languages/python/pymongo-driver/current/>`__
51+
driver instead.
52+
53+
- `Tutorial on using Motor with Tornado <http://motor.readthedocs.org/en/stable/tutorial-tornado.html>`__
54+
55+
- `Tutorial on using Motor with asyncio <https://motor.readthedocs.io/en/stable/tutorial-asyncio.html>`__
56+
57+
- `Motor Documentation <http://motor.readthedocs.org/>`__
58+
59+
- `Changelog <http://motor.readthedocs.org/en/stable/changelog.html>`__
60+
61+
- `Source Code <https://github.com/mongodb/motor/>`__
62+
63+
Follow the links below to read blog posts that describe specific use cases
64+
for the Motor driver:
65+
66+
- `Porting From PyMongo To Motor <http://emptysqua.re/blog/porting-from-pymongo-to-motor/>`__
67+
68+
- `Refactoring Tornado Coroutines <http://emptysqua.re/blog/refactoring-tornado-coroutines/>`__
69+
70+
- `All Motor articles on A. Jesse Jiryu Davis's blog <http://emptysqua.re/blog/category/motor/>`__
71+
72+
Installation
73+
------------
74+
75+
You must install the Motor driver module to make it available to your Python
76+
application. We recommend using `pip <http://pypi.python.org/pypi/pip>`__
77+
to install Motor.
78+
79+
The following command demonstrates how you can install the latest version of
80+
the module using the command line:
81+
82+
.. code-block:: sh
83+
84+
$ python -m pip install motor
85+
86+
For more information on requirements and other methods of installation,
87+
see the `Motor Installation <https://motor.readthedocs.io/en/stable/installation.html>`__
88+
documentation.
89+
90+
.. _connect-atlas-motor-driver:
91+
92+
Connect to MongoDB Atlas
93+
------------------------
94+
95+
You can use the following connection snippet to test your connection to
96+
your MongoDB deployment on Atlas using the ``asyncio`` asynchronous framework:
97+
98+
.. literalinclude:: /includes/connection-snippets/scram/py-motor-connection.py
99+
:language: python
100+
101+
This connection snippet uses the {+stable-api+} feature, which you can
102+
enable when using the Motor driver v2.5 and later to connect to MongoDB Server
103+
v5.0 and later. When you use this feature, you can update your driver or server without
104+
worrying about backward compatibility issues with any commands covered by the
105+
{+stable-api+}.
106+
107+
To learn more about the {+stable-api+} feature, see
108+
:manual:`{+stable-api+} </reference/stable-api/>` in the Server manual.
109+
110+
.. include:: /includes/stable-api-notice.rst
111+
112+
.. _connect-atlas-no-stable-api-motor-driver:
113+
114+
Connect to MongoDB Atlas Without the Stable API
115+
-----------------------------------------------
116+
117+
If you are using a version of MongoDB or the driver that doesn't support the
118+
{+stable-api+} feature, you can use the following code snippet to test your connection
119+
to your MongoDB deployment on Atlas:
120+
121+
.. literalinclude:: /includes/connection-snippets/scram/py-motor-connection-no-stableapi.py
122+
:language: python
123+
124+
If you are using the ``tornado`` asynchronous library, you can use the
125+
following code to connect to your MongoDB deployment:
126+
127+
.. literalinclude:: /includes/connection-snippets/scram/py-motor-connection-tornado.py
128+
:language: python
129+
130+
Connect to a MongoDB Server on Your Local Machine
131+
-------------------------------------------------
132+
133+
.. include:: /includes/localhost-connection.rst
134+
135+
To test whether you can connect to your server, replace the connection
136+
string in the :ref:`Connect to MongoDB Atlas <connect-atlas-motor-driver>` code
137+
example and run it.
138+
139+
Compatibility
140+
-------------
141+
142+
MongoDB Compatibility
143+
~~~~~~~~~~~~~~~~~~~~~
144+
145+
The following compatibility table specifies the recommended version or versions
146+
of the Motor (Python async) driver for use with a specific version of MongoDB.
147+
148+
The first column lists the driver version.
149+
150+
.. sharedinclude:: dbx/lifecycle-schedule-callout.rst
151+
152+
.. include:: /includes/mongodb-compatibility-table-motor.rst
153+
154+
.. include:: /includes/older-server-versions-unsupported.rst
155+
156+
Language Compatibility
157+
~~~~~~~~~~~~~~~~~~~~~~
158+
159+
The following compatibility table specifies the recommended version(s) of the
160+
Motor (Python async) driver for use with a specific version of Python.
161+
162+
The first column lists the driver version(s).
163+
164+
.. include:: /includes/language-compatibility-table-motor.rst
165+
166+
.. include:: /includes/about-driver-compatibility.rst
167+
168+
.. include:: /includes/help-links-motor.rst

0 commit comments

Comments
 (0)