File: installation.rst

package info (click to toggle)
python-motor 3.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,572 kB
  • sloc: python: 12,252; javascript: 137; makefile: 74; sh: 8
file content (82 lines) | stat: -rw-r--r-- 2,480 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Installation
============

.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. Critical bug fixes will be made until May 14th, 2027.
  We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported.
  To learn more, see `the migration guide <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/reference/migration/>`_.


Install Motor from PyPI_ with pip_::

  $ python3 -m pip install motor

Pip automatically installs Motor's prerequisite packages.
See :doc:`requirements`.

To install Motor from sources, you can clone its git repository and do::

  $ python3 -m pip install .

Dependencies
------------

Motor works in all the environments officially supported by Tornado or by
asyncio. It requires:

* Unix (including macOS) or Windows.
* PyMongo_ >=4.9,<5
* Python 3.9+

Optional dependencies:

Motor supports same optional dependencies as PyMongo. Required dependencies can be installed
along with Motor.

GSSAPI authentication requires ``gssapi`` extra dependency. The correct
dependency can be installed automatically along with Motor::

  $ pip install "motor[gssapi]"

similarly,

`MONGODB-AWS <https://pymongo.readthedocs.io/en/stable/examples/authentication.html#mongodb-aws>`_
authentication requires ``aws`` extra dependency::

  $ pip install "motor[aws]"

Support for mongodb+srv:// URIs requires ``srv`` extra dependency::

  $ pip install "motor[srv]"

`OCSP <https://pymongo.readthedocs.io/en/stable/examples/tls.html#ocsp>`_ requires ``ocsp`` extra dependency::

  $ pip install "motor[ocsp]"

Wire protocol compression with snappy requires ``snappy`` extra dependency::

  $ pip install "motor[snappy]"

Wire protocol compression with zstandard requires ``zstd`` extra dependency::

  $ pip install "motor[zstd]"

`Client-Side Field Level Encryption
<https://pymongo.readthedocs.io/en/stable/examples/encryption.html#client-side-field-level-encryption>`_
requires ``encryption`` extra dependency::

  $ pip install "motor[encryption]"

You can install all dependencies automatically with the following
command::

  $ pip install "motor[gssapi,aws,ocsp,snappy,srv,zstd,encryption]"

See `requirements <https://motor.readthedocs.io/en/stable/requirements.html>`_
for details about compatibility.


.. _PyPI: http://pypi.python.org/pypi/motor

.. _pip: http://pip-installer.org

.. _PyMongo: http://pypi.python.org/pypi/pymongo/