ODM with Pydantic made it easy


import mongoz

database_uri = "mongodb://localhost:27017"
registry = mongoz.Registry(database_uri)

class User(mongoz.Document):
    name: str = mongoz.String(max_length=255)
    age: int = mongoz.Integer()
    is_active: bool = mongoz.Boolean(default=True)

    class Meta:
        registry = registry
        database = "my_db"

Simple

With clear syntax, declaring models was never so easy.

Intuitive

100% Pydantic allowig you to take advantage of validations.

Friendly

With familiar interface built on the top of Motor.

Complexity removed to increase productivity

Although built on the top of Motor and PyMongo, Mongoz with its familiar and friendly interface makes it easy and pleasant to work with.

Define documents in a clear and intuitive way without extra hurdle.

Define Pydantic models inside documents and store them with ease and seemlessly.

Using the manager or que queryset.

Listen to any event triggered by a model operation.

Do you want to join?

Mongoz is open source and free to use but also needs enthusiastic people willing to help by contributing in any way, so you will be always welcomed to join.