This docs on this page refers to a PREVIOUS VERSION. For the latest stable release, go to https://docs.bokeh.org/

Archived docs for versions <= 1.0.4 have had to be modified from their original published configuration, and may be missing some features (e.g. source listing)

All users are encourage to update to version 1.1 or later, as soon as they are able.

bokeh.client.connection — Bokeh 1.0.2 documentation

bokeh.client.connection

Implements a very low level facility for communicating with a Bokeh Server.

Users will always want to use ClientSession instead for standard usage.

class ClientConnection(session, websocket_url, io_loop=None, arguments=None)[source]

A Bokeh low-level class used to implement ClientSession; use ClientSession to connect to the server.

__init__(session, websocket_url, io_loop=None, arguments=None)[source]

Opens a websocket connection to the server.

close(why='closed')[source]

Close the Websocket connection.

force_roundtrip()[source]

Force a round-trip request/reply to the server, sometimes needed to avoid race conditions. Mostly useful for testing.

Outside of test suites, this method hurts performance and should not be needed.

Returns:None
loop_until_closed()[source]

Execute a blocking loop that runs and executes event callbacks until the connection is closed (e.g. by hitting Ctrl-C).

While this method can be used to run Bokeh application code “outside” the Bokeh server, this practice is HIGHLY DISCOURAGED for any real use case.

pull_doc(document)[source]

Pull a document from the server, overwriting the passed-in document

Parameters:document – (Document) The document to overwrite with server content.
Returns:None
push_doc(document)[source]

Push a document to the server, overwriting any existing server-side doc.

Parameters:document – (Document) A Document to push to the server
Returns:The server reply
request_server_info()[source]

Ask for information about the server.

Returns:A dictionary of server attributes.
connected

Whether we’ve connected the Websocket and have exchanged initial handshake messages.

io_loop

The Tornado IOLoop this connection is using.

url

The URL of the websocket this Connection is to.