Skip to main content

An optimistic and efficient CRUD wrapper for MongoDB.

Project description

Medusa Logo

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

mongoguard-0.1.5.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mongoguard-0.1.5-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file mongoguard-0.1.5.tar.gz.

File metadata

  • Download URL: mongoguard-0.1.5.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

Hashes for mongoguard-0.1.5.tar.gz
Algorithm Hash digest
SHA256 908cdc7304532839a93634e13c57d5c8a03cfc07317b64e700a82aa839ae2e3e
MD5 bc8a6b8ba7c34da01a93068d334a8b9d
BLAKE2b-256 ae1d49d709af983b8adb47161da3002d9bd338245c43a6df3278d652c5da8272

See more details on using hashes here.

File details

Details for the file mongoguard-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: mongoguard-0.1.5-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

Hashes for mongoguard-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0c7d0f196be6e033e7d4ed267f8a8e7a1e4931ee2f2d301a1c7f307864ffcdaf
MD5 cc551594120de9bafa2bf837180f9976
BLAKE2b-256 d1bc01b5d1e04e290682a57aa6ecab38c9d96c72eb57bd14f169fcc592a97029

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page