Skip to content

Latest commit

History

History
56 lines (44 loc) 路 3.15 KB

index.md

File metadata and controls

56 lines (44 loc) 路 3.15 KB

motormongo

Description Badge
PyPI - Version PyPI - Version
Downloads Downloads
PyPI License PyPI License
GitHub Contributors GitHub Contributors
Code Coverage codecov
Code Style code style: black
Documentation Documentation Status

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.

Installation

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