Concepts¶
Mongoz is easiest to reason about as four connected owners:
- A Registry owns one native async client and exposes databases and collections.
- Documents declare modeled BSON data with fields and validation.
- Managers and QuerySets build isolated query state and execute database operations.
- BSON and serialization define the boundary between modeled values and native MongoDB data.
These layers cooperate without reconstructing each other's truth. MongoDB still owns stored data and server behavior; PyMongo still owns driver lifecycle and native database semantics.