bokeh.client.states#

Provide a set of objects to represent different stages of a connection to a Bokeh server.

class CONNECTED_AFTER_ACK[source]#

The ClientConnection connected to a Bokeh server, and has received an ACK from it.

class CONNECTED_BEFORE_ACK[source]#

The ClientConnection connected to a Bokeh server, but has not yet received an ACK from it.

class DISCONNECTED(reason: ErrorReason = ErrorReason.NO_ERROR, error_code: int | None = None, error_detail: str = '')[source]#

The ClientConnection was connected to a Bokeh server, but is now disconnected.

__init__(reason: ErrorReason = ErrorReason.NO_ERROR, error_code: int | None = None, error_detail: str = '') None[source]#

Constructs a DISCONNECT-State with given reason (ErrorReason enum), error id and additional information provided as string.

property error_code: int | None#

Holds the error code, if any. None otherwise.

property error_detail: str#

Holds the error message, if any. Empty string otherwise.

property error_reason: ErrorReason#

The reason for the error encoded as an enumeration value.

class ErrorReason(value)[source]#

An enumeration.

class NOT_YET_CONNECTED[source]#

The ClientConnection is not yet connected.

class WAITING_FOR_REPLY(reqid: ID)[source]#

The ClientConnection has sent a message to the Bokeh Server which should generate a paired reply, and is waiting for the reply.

property reply: Message[Any] | None#

The reply from the server. (None until the reply arrives)

property reqid: ID#

The request ID of the originating message.