Skip to content

๐Ÿงฉ mongo-ops โ€” Async MongoDB Operations Layer for FastAPI

mongo-ops is a modular, high-performance MongoDB operations library designed for FastAPI microservices. It standardizes repository patterns, async CRUD operations, and model management โ€” with extensible components for both Beanie and Motor.


๐Ÿš€ Key Features

  • ๐Ÿงฑ Unified repository pattern for MongoDB collections
  • โšก Fully asynchronous (Motor-based)
  • ๐Ÿงฌ Pydantic v2 data model integration
  • ๐Ÿงฐ Built-in CRUD and aggregation utilities
  • ๐Ÿ”’ Transaction and session helpers
  • ๐Ÿงฉ Optional Beanie ORM integration
  • ๐Ÿงช Pytest-friendly architecture

๐Ÿ“ฆ Installation

From your internal PyPI:

Bash
pip install --extra-index-url https://$PYPI_USERNAME:$PYPI_PASSWORD@pip.aetoskia.com/simple mongo-ops

From local source:

Bash
pip install -e .

๐Ÿ“ Documentation Structure

Section Description
Overview Core concept and architecture overview
Core Components BaseDocument, MongoConnectionManager, BaseRepository
Use Cases CRUD, transactions, pagination, and more
Best Practices Recommended repo structure and patterns
Common Patterns Service layer, aggregation, soft deletes
Error Handling Centralized error and exception management
Testing Pytest configuration and fixtures


ยฉ Aetoskia Internal โ€” mongo-ops 0.1.1