TextCache

class TextCache[source]

Bases: ABC

An interface for looking up text for various flavors of entity identifiers.

Methods Summary

get_texts(identifiers)

Get text for the given identifiers for the cache.

get_texts_dict(identifiers)

Get a dictionary from identifiers to their associated text.

Methods Documentation

abstractmethod get_texts(identifiers: Sequence[str]) Sequence[str | None][source]

Get text for the given identifiers for the cache.

Parameters:

identifiers (Sequence[str])

Return type:

Sequence[str | None]

get_texts_dict(identifiers: Sequence[str]) dict[str, str | None][source]

Get a dictionary from identifiers to their associated text.

Parameters:

identifiers (Sequence[str])

Return type:

dict[str, str | None]