Skip to content

Concepts

Mongoz is easiest to reason about as four connected owners:

  1. A Registry owns one native async client and exposes databases and collections.
  2. Documents declare modeled BSON data with fields and validation.
  3. Managers and QuerySets build isolated query state and execute database operations.
  4. 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.