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.6.tar.gz (5.0 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.6-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mongoguard-0.1.6.tar.gz
  • Upload date:
  • Size: 5.0 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.6.tar.gz
Algorithm Hash digest
SHA256 53e444c2cc2ad93ccdf20f5b356bbb7b3ef475002c7decc1df5dbd8706b286de
MD5 411bd0eceacf68b51194d78d5f938832
BLAKE2b-256 25b665a1046d3f25a75923ff3b5605621291bcc0c145be6596f257fcc5fb7e5b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mongoguard-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 5.2 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 84ba36e3faa3c4c3b3913df77c83763526eaf22b650b41a909cc1d9f8a248f1b
MD5 08a5ee7d96482302bbee483ad02a8995
BLAKE2b-256 184f64a423c88d2d6f54ce82c1ecc16d71d01cf00c8cca5092580bb08523d9fd

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