Skip to content

Repository Layer

repos

Classes

RepositoryMeta

Bases: ABCMeta

Metaclass that automatically applies decorators to repository methods.

Supports configuration via class inheritance:

Example
# Enable logging (default)
class UserRepository(MongoRepository[User]):
    pass


# Disable logging
class UserRepository(MongoRepository[User], log=False):
    pass

BaseRepository

Bases: ABC, Generic[E]

Abstract base repository for generic CRUD operations.

This class defines the standard CRUD interface that all repositories must implement, regardless of the underlying database technology.

options: show_root_heading: true show_source: true heading_level: 2 members_order: source show_signature_annotations: true separate_signature: true