bokeh.server.callbacks

Provide classes to represent callback code that can be associate with Bokeh Documents and Sessions.

class NextTickCallback(callback: Callable[[], None], *, callback_id: ID)[source]

Represent a callback to execute on the next IOLoop “tick”.

__init__(callback: Callable[[], None], *, callback_id: ID) None[source]
Parameters
  • callback (callable) –

  • id (ID) –

class PeriodicCallback(callback: Callable[[], None], period: int, *, callback_id: ID)[source]

Represent a callback to execute periodically on the IOLoop at a specified periodic time interval.

__init__(callback: Callable[[], None], period: int, *, callback_id: ID) None[source]
Parameters
  • callback (callable) –

  • period (int) –

  • id (ID) –

property period: int

The period time (in milliseconds) that this callback should repeat execution at.

class SessionCallback(callback: Callable[[], None], *, callback_id: ID)[source]

A base class for callback objects associated with Bokeh Documents and Sessions.

__init__(callback: Callable[[], None], *, callback_id: ID) None[source]
Parameters
  • callback (callable) –

  • id (ID) –

property callback: Callable[[], None]

The callable that this callback wraps.

property id: ID

A unique ID for this callback

class TimeoutCallback(callback: Callable[[], None], timeout: int, *, callback_id: ID)[source]

Represent a callback to execute once on the IOLoop after a specified time interval passes.

__init__(callback: Callable[[], None], timeout: int, *, callback_id: ID) None[source]
Parameters
  • callback (callable) –

  • timeout (int) –

  • id (ID) –

property timeout: int

The timeout (in milliseconds) that the callback should run after.