GitHub

ServerClient

API reference for ServerClient.

A client connected to a server: its id and the annotations the server's middleware added to it.

Attributes

AttributeTypeDescription
id= id
annotationsContext[Any] = Context.empty()

Functions

__init__

__init__(id) -> None
ParameterTypeDescription
idint
def __init__(self, id: int) -> None:
    self.id = id
    self.annotations: Context[Any] = Context.empty()

annotate

annotate[A, T](tag, value) -> Self
ParameterTypeDescription
tagTagLike[A, T]
valueA

Returns Self

def annotate[A, T](self, tag: TagLike[A, T], value: A) -> Self:
    self.annotations = self.annotations.add(tag, value)
    return self