jupyter_server.services.events package#

Submodules#

A Websocket Handler for emitting Jupyter server events.

Added in version 2.0.

class jupyter_server.services.events.handlers.EventHandler(application, request, **kwargs)#

Bases: APIHandler

REST api handler for events

auth_resource = 'events'#
post()#

Emit an event.

class jupyter_server.services.events.handlers.SubscribeWebsocket(application, request, **kwargs)#

Bases: JupyterHandler, WebSocketHandler

Websocket handler for subscribing to events

auth_resource = 'events'#
async event_listener(logger, schema_id, data)#

Write an event message.

Return type:

None

get(*args, **kwargs)#

Get an event socket.

on_close()#

Handle a socket close.

open()#

Routes events that are emitted by Jupyter Server’s EventBus to a WebSocket client in the browser.

async pre_get()#

Handles authorization when attempting to subscribe to events emitted by Jupyter Server’s eventbus.

jupyter_server.services.events.handlers.get_timestamp(data)#

Parses timestamp from the JSON request body

Return type:

Optional[datetime]

jupyter_server.services.events.handlers.validate_model(data)#

Validates for required fields in the JSON request body

Return type:

None

Module contents#