pydeephaven.experimental.plugin_client#

Experimental module to communicate with server-side plugins from the client.

class Fetchable(session, typed_ticket)[source]#

Bases: ServerObject

Represents an object on the server that could be fetched and used or communicated with from the client.

fetch()[source]#

Returns a client object that can be interacted with, representing an object that actually only exists on the server. In contrast to a Fetchable instance, which only serves as a reference to a server object, this method can return a Table or PluginClient. Note that closing this Fetchable or the result returned from this method will also close the other, take care when signaling that it is safe to release this object on the server.

Return type:

Union[Table, PluginClient]

ticket#

The ticket that points to the object on the server.

type_#

The type of the object. May be None, indicating that the instance cannot be connected to or otherwise directly used from the client.

typed_ticket()#

Returns a typed ticket, suitable for use in communicating with an ObjectType plugin on the server.

Return type:

TypedTicket

class PluginClient(session, exportable_obj)[source]#

Bases: ServerObject

Connected to an object on the server, this provides access to that object through messages sent from the server. Use resp_stream to read messages that the server has sent, and req_stream to send messages back to the server, if supported.

ticket#

The ticket that points to the object on the server.

type_#

The type of the object. May be None, indicating that the instance cannot be connected to or otherwise directly used from the client.

typed_ticket()#

Returns a typed ticket, suitable for use in communicating with an ObjectType plugin on the server.

Return type:

TypedTicket

class PluginRequestStream(req_queue, source_ticket)[source]#

Bases: object

A stream of requests to the server. If supported by the server-side plugin, these will be processed on the server in the order they are sent.

write(payload, references)[source]#

Sends a message to the server, consisting of a payload of bytes and a list of objects that exist on the server.

Return type:

None

class PluginResponseStream(stream_resp, session)[source]#

Bases: object

A stream of responses from the server. Will contain at least one response from when the object was first connected to, depending on the server implementation.