Skip to content

loader

Functions:

Attributes:

DataLoader module-attribute

DataLoader: TypeAlias = '_DataLoader'

Defines a protocol for saving data.

load_content_record async

load_content_record(
    record: ContentRecord,
    *,
    registry: Registry,
    stack: AsyncExitStack | None = None
) -> UnpackedValue | UnpackedValueStream

Load the given content from the given record.

load_manifest_record async

load_manifest_record(
    manifest: ManifestRecord,
    contents: Sequence[ContentRecord],
    /,
    *,
    registry: Registry,
    stack: AsyncExitStack | None = None,
) -> Storable

Load an object from the given manifest record.

load_one async

load_one(
    manifest: ManifestRecord,
    cls: type[S],
    *,
    registry: Registry,
    session: AsyncSession,
    stack: AsyncExitStack | None = None
) -> S

Load a single object from the given manifest record.

new_loader async

new_loader(
    registry: Registry,
    session: AsyncSession,
    stack: AsyncExitStack | None = None,
) -> AsyncIterator[DataLoader]

Create a context manager for saving data.