An optimistic and efficient CRUD wrapper for MongoDB.
Project description
MongoGuard
A lightweight, optimistic, and efficient CRUD layer for MongoDB — built with safety, validation, built-in logging, and error handling, all designed for simplicity and reliability.
📌 Features
- ✅ Automatic error handling
- 🧩 Integrated logging for all operations
- 🔒 Full Pydantic model support
- 🔁 Type-safe input and output using Pydantic BaseModels
📦 Installation
pip install mongoguard
Example
from mongoguard import MongoGuard
from pydantic import BaseModel
mg = MongoGuard(
mongo_url="mongodb://localhost:27017/",
db_name="Example",
collection_name="User"
)
class UserModel(BaseModel):
id: int
name: str
email: str
password: str
mg.fetch_collection(out_model=UserModel)
❤️ Contributing & Community
Created and maintained by Mukund Thorat.
We welcome contributors to help improve MongoGuard! If you are interested in contributing or collaborating, please contact me via email: mukundthorat.official@gmail.com
🔐 License
This project is licensed under the terms of the MIT license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mongoguard-0.1.4.tar.gz.
File metadata
- Download URL: mongoguard-0.1.4.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
404ca94c87c1cd2294330583dd6230bc2e77eaa023661bb9ba686817c4fe7db0
|
|
| MD5 |
8a61b162f212e1f8c9e018b3e0d60eeb
|
|
| BLAKE2b-256 |
04711f8e43b3f9b17bfc6cafc87b496b7b02d0173c901696bf7dcb35a2fd861d
|
File details
Details for the file mongoguard-0.1.4-py3-none-any.whl.
File metadata
- Download URL: mongoguard-0.1.4-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
612a18defa5f955fbca78a663c52a8bb0a9397136b624f58b6cf872b9a4a4e27
|
|
| MD5 |
686014fdaab8b67fa52de10929d28692
|
|
| BLAKE2b-256 |
a3bf9c8a76f1aac7b34f7ac3cf8b804fbc5435c5910595d96fef1d5ad2494e44
|