Basic Data Types#

Entity Identifiers#

Containers#

class lenskit.data.types.UITuple(user, item)#

Bases: NamedTuple, Generic[T]

Tuple of (user, item) data, typically for configuration and similar purposes.

Parameters:
  • user (T)

  • item (T)

user: T#

User data.

item: T#

Item data.

classmethod create(x)#

Create a user-item tuple from a tuple or data. If a single value is provided, it is used for both user and item.

Parameters:

x (UITuple[T] | tuple[T, T] | T)

Return type:

UITuple[T]