The client.py module#

Summary#

RockyClient

Provides the client object for interacting with the Rocky/Freeflow app.

connect

Connect to a Rocky/Freeflow app instance.

connect_to_rocky

This function is deprecated.

wait_for

Waits until the given predicate callback returns True or raises TimeoutError.

Description#

Module that defines the RockyClient class, which acts as a proxy for a Rocky application session.

Module detail#

client.connect(host: str | None = None, port: int = _PYROCKY_DEFAULT_PORT) RockyClient#

Connect to a Rocky/Freeflow app instance.

Parameters:
hoststr, optional

Host name where the app is running. On Windows, default is ``”localhost”`. On Linux, it defaults to a unix domain socket connection.

portint, optional

Service port to connect to.

Returns:
RockyClient

Client object for interacting with the Rocky/Freeflow app.

client.connect_to_rocky(host: str = 'localhost', port: int = _PYROCKY_DEFAULT_PORT) RockyClient#

This function is deprecated. Use connect() instead.

client.wait_for(predicate_callback: Callable[[], bool], *, timeout: int) None#

Waits until the given predicate callback returns True or raises TimeoutError.

Parameters:
predicate_callback

a function that returns a boolean value.

timeout

for how long to wait in seconds. If the timeout is reached, a TimeoutError is raised.

client.DEFAULT_SERVER_PORT = 18615#