Description | Badge |
---|---|
PyPI - Version | |
Downloads | |
PyPI License | |
GitHub Contributors | |
Code Coverage | |
Code Style | |
Documentation |
motormongo
is an Object Document Mapper (ODM) for MongoDB built on top
of motor
, the MongoDB
recommended asynchronous Python driver for MongoDB Python applications, designed to work with Tornado or
asyncio and enable non-blocking access to MongoDB.
Asynchronous operations in a backend system, built using FastAPI for
example, enhances performance and scalability by enabling non-blocking, concurrent handling of multiple I/O requests,
leading to more efficient use of server resources, by forcing the CPU usage on the backend server's main thread to be
maximized across concurrent requests. For more low-level details on the advantages of asynchronous motormongo
over
existing MongoDB ODMs, such as mongoengine
see here.
The interface for instantiating Document classes follows similar logic
to mongoengine
, enabling ease-of-transition and
migration from mongoengine
to the asynchronous motormongo
.
To install motormongo
, you can use pip
inside your virtual environment:
python -m pip install motormongo
Alternatively, to install motormongo
into your poetry
environment:
poetry add motormongo
:maxdepth: 2
:numbered:
quickstart.md
why_motormongo.md
fields.md
crud_classmethods.md
aggregation.md
crud_instance_methods.md
polymorphism_and_inheritance.md
pooling_configuration.md
fast_api_integration.md