orangeqs.juice.client.ipython#

Utilities for creating IPython kernel clients.

Module Contents#

Functions#

ipython_client_async

Create an AsyncKernelClient for the specified service.

ipython_client

Create a BlockingKernelClient for the specified service.

API#

orangeqs.juice.client.ipython.ipython_client_async(service: str, connection_registry: orangeqs.juice.schemas.ipython.KernelConnectionRegistry | None = None) jupyter_client.asynchronous.client.AsyncKernelClient#

Create an AsyncKernelClient for the specified service.

Note: The channels are not started automatically. You can call start_channels() on the client to start all channels.

Parameters#

  • service (str): Name of the service for which to create the AsyncKernelClient.

  • connection_registry (KernelConnectionRegistry, optional): The registry containing kernel connection information. If not provided, it will be loaded from shared runtime data.

Returns#

  • (AsyncKernelClient): An instance of AsyncKernelClient for the specified service.

Raises#

  • (ValueError): If the service is not found in the connection registry.

orangeqs.juice.client.ipython.ipython_client(service: str, connection_registry: orangeqs.juice.schemas.ipython.KernelConnectionRegistry | None = None) jupyter_client.blocking.client.BlockingKernelClient#

Create a BlockingKernelClient for the specified service.

Note: The channels are not started automatically. You can call start_channels() on the client to start all channels.

Parameters#

  • service (str): Name of the service for which to create the BlockingKernelClient.

  • connection_registry (KernelConnectionRegistry, optional): The registry containing kernel connection information. If not provided, it will be loaded from shared runtime data.

Returns#

  • (BlockingKernelClient): An instance of BlockingKernelClient for the specified service.

Raises#

  • (ValueError): If the service is not found in the connection registry.