The launcher.py module#
Summary#
Launch the Rocky executable with the PyRocky server enabled. |
|
Launch the FreeFlow executable with the PyRocky server enabled. |
|
Launch a Rocky or FreeFlow container with the PyRocky server enabled. |
Description#
Module that exposes functions to launch a Rocky application session.
Module detail#
- launcher.launch_rocky(rocky_exe: pathlib.Path | str | None = None, rocky_version: int | None = None, *, headless: bool = True, server_port: int = _PYROCKY_DEFAULT_PORT, close_existing: bool = False) ansys.rocky.core.client.RockyClient#
Launch the Rocky executable with the PyRocky server enabled.
This method waits for Rocky to start up and then returns a
`RockyClientinstance.- Parameters:
- rocky_exe:
Path to the Rocky executable.
- rocky_version:
Rocky version to run. If no executable is passed and the version is not specified, this method tries to find the path using the latest Ansys path returned by ansys-tools-path API.
- headless:
Whether to launch Rocky in headless mode. The default is
True.- server_port:
Set the port for Rocky RPC server.
- close_existing:
Checks if a session exists under the given server_port and closes it before attempting to launch a new session.
- Returns:
RockyClientRocky client instance connected to the launched Rocky app.
- launcher.launch_freeflow(freeflow_exe: pathlib.Path | str | None = None, freeflow_version: int | None = None, *, headless: bool = True, server_port: int = _PYROCKY_DEFAULT_PORT, close_existing: bool = False) ansys.rocky.core.client.RockyClient#
Launch the FreeFlow executable with the PyRocky server enabled.
This method waits for Rocky to start up and then returns a
`RockyClientinstance.- Parameters:
- freeflow_exe:
Path to the Freeflow executable.
- freeflow_version:
Freeflow version to run. If no executable is passed and the version is not specified, this method tries to find the path using the latest Ansys path returned by ansys-tools-path API.
- headless:
Whether to launch Freeflow in headless mode. The default is
True.- server_port:
Set the port for Rocky RPC server.
- close_existing:
Checks if a session exists under the given server_port and closes it before attempting to launch a new session.
- Returns:
RockyClientRocky client instance connected to the launched Rocky/Freeflow app.
- launcher.launch_container(product: Literal['rocky', 'freeflow'] = 'rocky', version_tag: str = '26.1.0', port: int = _PYROCKY_DEFAULT_PORT, license_server: str | None = None) ansys.rocky.core.client.RockyClient#
Launch a Rocky or FreeFlow container with the PyRocky server enabled.
- Parameters:
- product:
The product variant of the container to launch (“rocky” or “freeflow”).
- version_tag:
Semantic version tag of the container image. e.g. “26.1.0”.
- port:
Port to use for the PyRocky server inside the container.
- license_server:
Optional license server string to set in the container. If not provided, the function will attempt to read the ANSYSLMD_LICENSE_FILE environment variable from the host system.
- Returns:
RockyClientRocky client instance connected to the launched container.
- launcher.MINIMUM_ANSYS_VERSION_SUPPORTED = 242#
- launcher.COMPANY = 'Ansys'#