- Notifications
You must be signed in to change notification settings - Fork211
Motor - the async Python driver for MongoDB and Tornado or asyncio
License
mongodb/motor
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Motor is a full-featured, non-blockingMongoDBdriver for Pythonasyncio andTornado applications. Motor presents a coroutine-based APIfor non-blocking access to MongoDB.
"We use Motor in high throughput environments, processing tens ofthousands of requests per second. It allows us to take full advantageof modern hardware, ensuring we utilise the entire capacity of ourpurchased CPUs. This helps us be more efficient with computing power,compute spend and minimises the environmental impact of ourinfrastructure as a result."
--David Mytton, Server Density
"We develop easy-to-use sensors and sensor systems with open sourcesoftware to ensure every innovator, from school child to laboratoryresearcher, has the same opportunity to create. We integrate Motorinto our software to guarantee massively scalable sensor systems foreveryone."
--Ryan Smith, inXus Interactive
For issues with, questions about, or feedback for PyMongo, please lookinto oursupport channels. Pleasedo not email any of the Motor developers directly with issues orquestions - you're more likely to get an answer on theStackOverflow(using a "mongodb" tag).
Think you've found a bug? Want to see a new feature in Motor? Pleaseopen a case in our issue management tool, JIRA:
- Create an account and login.
- Navigate tothe MOTORproject.
- ClickCreate Issue - Please provide as much information aspossible about the issue type and how to reproduce it.
Bug reports in JIRA for all driver projects (i.e. MOTOR, CSHARP, JAVA)and the Core Server (i.e. SERVER) project arepublic.
Please include all of the following information when opening an issue:
Detailed steps to reproduce the problem, including full traceback, ifpossible.
The exact python version used, with patch level:
python -c"import sys; print(sys.version)"
- The exact version of Motor used, with patch level:
python -c"import motor; print(motor.version)"
- The exact version of PyMongo used, with patch level:
python -c"import pymongo; print(pymongo.version); print(pymongo.has_c())"
- The exact Tornado version, if you are using Tornado:
python -c"import tornado; print(tornado.version)"
- The operating system and version (e.g. RedHat Enterprise Linux 6.4,OSX 10.9.5, ...)
If you've identified a security vulnerability in a driver or any otherMongoDB project, please report it according to theinstructionshere.
Motor can be installed withpip:
pip install motor
Motor works in all the environments officially supported by Tornado orby asyncio. It requires:
- Unix (including macOS) or Windows.
- PyMongo >=4.9,<5
- Python 3.9+
Optional dependencies:
Motor supports same optional dependencies as PyMongo. Requireddependencies can be installed along with Motor.
GSSAPI authentication requiresgssapi
extra dependency. The correctdependency can be installed automatically along with Motor:
pip install"motor[gssapi]"
similarly,
MONGODB-AWS authentication requiresaws
extra dependency:
pip install"motor[aws]"
Support for mongodb+srv:// URIs requiressrv
extra dependency:
pip install"motor[srv]"
OCSP requiresocsp
extra dependency:
pip install"motor[ocsp]"
Wire protocol compression with snappy requiressnappy
extradependency:
pip install"motor[snappy]"
Wire protocol compression with zstandard requireszstd
extradependency:
pip install"motor[zstd]"
Client-Side Field Level Encryption requiresencryption
extradependency:
pip install"motor[encryption]"
You can install all dependencies automatically with the followingcommand:
pip install"motor[gssapi,aws,ocsp,snappy,srv,zstd,encryption]"
Seerequirementsfor details about compatibility.
See theexamples onReadTheDocs.
Motor's documentation is onReadTheDocs.
Build the documentation with Python 3.9+. Installsphinx,Tornado,andaiohttp, and docd doc; make html
.
- MongoDB Learn -Pythoncourses.
- Python Articles on DeveloperCenter.
Runpython setup.py test
. Tests are located in thetest/
directory.
About
Motor - the async Python driver for MongoDB and Tornado or asyncio