anymodel.types.collections

Type-safe collections for entity relationships.

This module provides the Collection class for managing groups of entities with support for lazy loading.

Classes

class anymodel.types.collections.Collection(seq_or_loader)[source]

Bases: Sequence

A lazy-loadable collection of entities.

Collections can be initialized with either a sequence of entities or a loader function that returns entities when called. This supports lazy loading of related entities.

__init__(seq_or_loader)[source]
load()[source]