orangeqs.juice.schemas.ipython#
IPython related schemas.
Module Contents#
Classes#
Configurations for IPython kernels of all services. |
|
IPython kernel connection of a single service. |
|
Registry of IPython kernel connection information for all services. |
API#
- class orangeqs.juice.schemas.ipython.IPythonKernelConfigs(/, **data: Any)#
Bases:
orangeqs.juice.settings.ConfigurableConfigurations for IPython kernels of all services.
IPython kernels in OrangeQS Juice services use the default configuration of IPython if not configured here. This means that the kernel will use a random key and ports by default.
This configuration allows to override the default IPython configuration.
- services: dict[str, KernelConnectionInfo]#
‘Field(…)’
IPython kernel configuration for all services.
- for_service(service_name: str) orangeqs.juice.schemas.ipython.KernelConnectionInfo#
Return the connection info configured for a service.
Defaults unset
ip/supervisor_portto the address of a service spawned by Juice Orchestrator in the same Podman network (juice-<service_name>, port 9001 - matchingServiceSettings.supervisor_port’s own default).Parameters#
service_name (str): The name of the service.
Returns#
(KernelConnectionInfo): The connection info for the service, with
ip/supervisor_portdefaulted if unset.
- class orangeqs.juice.schemas.ipython.KernelConnectionInfo(/, **data: Any)#
Bases:
pydantic.BaseModelIPython kernel connection of a single service.
This schema is compatible with the connection info used by IPython,
jupyter_client.connect.KernelConnectionInfothrough the propertyjupyter_client_connection_info.Also carries
supervisor_port, which is not part of the actual IPython kernel connection (excluded fromjupyter_client_connection_info) but piggybacked here soIPythonKernelConfigscan serve as a single per-service address config for both a service’s IPython kernel and its supervisord XML-RPC server (seeIPythonKernelConfigs.for_service). This makes this schema more a “SupervisedIPythonServiceConnectionInfo” than pure IPython kernel connection info.- shell_port: orangeqs.juice.schemas.common.PortNumber | None#
None
IPython shell port.
- iopub_port: orangeqs.juice.schemas.common.PortNumber | None#
None
IPython IOPub port.
- stdin_port: orangeqs.juice.schemas.common.PortNumber | None#
None
IPython standard input port.
- control_port: orangeqs.juice.schemas.common.PortNumber | None#
None
IPython control port.
- hb_port: orangeqs.juice.schemas.common.PortNumber | None#
None
IPython heartbeat port.
- supervisor_port: orangeqs.juice.schemas.common.PortNumber | None#
None
Port this service’s supervisord inet HTTP server listens on.
Not part of the IPython kernel connection - see the class docstring.
- property jupyter_client_connection_info: jupyter_client.connect.KernelConnectionInfo#
Convert to a Jupyter Client KernelConnectionInfo object.
- class orangeqs.juice.schemas.ipython.KernelConnectionRegistry(/, **data: Any)#
Bases:
orangeqs.juice.settings.RuntimeDataRegistry of IPython kernel connection information for all services.
IPython services store their connection information in this registry on start. IPython clients use this registry to load the connection information for the service they want to connect to. The registry is stored in the shared runtime data directory
- services: dict[str, orangeqs.juice.schemas.ipython.KernelConnectionInfo]#
‘Field(…)’
Kernel connection information for all services.