๐งฉ 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:
๐ 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 |
๐ Related Resources
- Source Code: Gitea Repository
- Internal PyPI: pip.aetoskia.com/simple/mongo-ops
- Drone CI: Auto-builds and publishes tagged releases.
ยฉ Aetoskia Internal โ mongo-ops 0.1.2