orangeqs.juice.service#

OrangeQS Juice Service API.

Submodules#

Package Contents#

Classes#

Service

Base class for OrangeQS Juice services.

IPythonService

IPython service implementation for OrangeQS Juice.

Functions#

start

Start an OrangeQS Juice service by its name.

API#

orangeqs.juice.service.start(service_name: str) None#

Start an OrangeQS Juice service by its name.

Imports the entrypoint class and starts the service.

Parameters#

  • service_name (str): The name of the service to start.s

class orangeqs.juice.service.Service(service_name: str)#

Bases: orangeqs.juice.service._task_server.TaskServer

Base class for OrangeQS Juice services.

This class can be extended to create specific service implementations. It provides a common interface for starting services.

Parameters#

  • service_name (str): The name of the service. Will be used to load the service configuration.

start() None#

Start the service.

This method can be overridden by subclasses to implement service-specific startup logic. Should always call super().start().

If you want to run asynchronous code, you should use self.loop to run your async functions.

class orangeqs.juice.service.IPythonService(service_name: str, /, *, init_module: str | None = None)#

Bases: orangeqs.juice.service._service.Service

IPython service implementation for OrangeQS Juice.

start() None#

Start an IPython OrangeQS Juice service.

property loop: asyncio.AbstractEventLoop#

The event loop used by the IPython kernel.

Raises#

  • (RuntimeError): If the IPython kernel is using a different event loop than the one set in the constructor. This should never happen, but is there to catch any future IPython changes that cause the kernel to use a different loop.