DataLoader

Constructor:

Signature:

def __init__(
self,
load_fn: Callable[[List[K]], Awaitable[Sequence[T | BaseException]]],
max_batch_size: int | None = None,
cache: bool = True,
loop: AbstractEventLoop | None = None,
cache_map: AbstractCache[K, T] | None = None,
cache_key_fn: Callable[[K], Hashable] | None = None,
) -> :
...

Parameters:

  1. load_fn:

    Type
    Callable[[List[K]], Awaitable[Sequence[T | BaseException]]]
  2. max_batch_size:

    Type
    int | None
    Default
    None
  3. cache:

    Type
    bool
    Default
    True
  4. loop:

    Type
    AbstractEventLoop | None
    Default
    None
  5. cache_map:

    Type
    AbstractCache[K, T] | None
    Default
    None
  6. cache_key_fn:

    Type
    Callable[[K], Hashable] | None
    Default
    None

Methods:

Attributes:

  1. batch:

    Type
    Batch[K, T] | None
  2. cache:

    Type
    bool
  3. cache_map:

    Type
    AbstractCache[K, T]
  4. load_fn:

  5. max_batch_size:

  6. loop:

    Type
    AbstractEventLoop