The ``launcher.py`` module ========================== .. py:module:: ansys.speos.core.launcher Summary ------- .. py:currentmodule:: launcher .. tab-set:: .. tab-item:: Functions .. list-table:: :header-rows: 0 :widths: auto * - :py:obj:`~launch_speos` - Start the Speos Service remotely using the product instance management API. * - :py:obj:`~launch_remote_speos` - Start the Speos Service remotely using the product instance management API. * - :py:obj:`~launch_local_speos_rpc_server` - Launch Speos RPC server locally. Description ----------- Module to start Speos RPC Server. .. !! processed by numpydoc !! Module detail ------------- .. py:function:: launch_speos(version = None) Start the Speos Service remotely using the product instance management API. Prerequisite : product instance management configured. :Parameters: **version** : :class:`python:str`, :obj:`optional` The Speos Service version to run, in the 3 digits format, such as "242". If unspecified, the version will be chosen by the server. :Returns: :obj:`ansys.speos.core.speos.Speos` An instance of the Speos Service. .. !! processed by numpydoc !! .. py:function:: launch_remote_speos(version = None) Start the Speos Service remotely using the product instance management API. When calling this method, you need to ensure that you are in an environment where PyPIM is configured. This can be verified with :func:`pypim.is_configured `. :Parameters: **version** : :class:`python:str`, :obj:`optional` The Speos Service version to run, in the 3 digits format, such as "242". If unspecified, the version will be chosen by the server. :Returns: :obj:`ansys.speos.core.speos.Speos` An instance of the Speos Service. .. !! processed by numpydoc !! .. py:function:: launch_local_speos_rpc_server(version = None, port = DEFAULT_PORT, server_message_size = MAX_SERVER_MESSAGE_LENGTH, client_message_size = MAX_CLIENT_MESSAGE_SIZE, logfile_loc = None, log_level = 20, speos_rpc_path = None, use_insecure = False) Launch Speos RPC server locally. This method only works for SpeosRPC server supporting UDS or WNUA transport. For release 251, minimal requirement is 2025.1.4. For release 252, minimal requirement is 2025.2.4. From release 261, grpc transport is always supported. .. warning:: Do not execute this function with untrusted function argument or environment variables. See the :ref:`security guide` for details. :Parameters: **version** : :obj:`Union`\[:class:`python:str`, :class:`python:int`], :obj:`optional` The Speos server version to run, in the 3 digits format, such as "242". If unspecified, the version will be chosen as ``ansys.speos.core.kernel.client.LATEST_VERSION``. If ``ansys.speos.core.kernel.client.LATEST_VERSION`` is not available, the latest version installed on the machine will be tried to be used. **port** : :obj:`Union`\[:class:`python:str`, :class:`python:int`], :obj:`optional` Port number where the server is running. By default, ``ansys.speos.core.kernel.client.DEFAULT_PORT``. **server_message_size** : :class:`python:int` Maximum message length value accepted by the Speos RPC server. By default, value stored in environment variable SPEOS_MAX_MESSAGE_LENGTH or 268 435 456. **client_message_size** : :class:`python:int` Maximum message size of a newly generated channel. By default, ``MAX_CLIENT_MESSAGE_SIZE``. **logfile_loc** : :class:`python:str`, :obj:`optional` Location for the logfile to be created in. When *None*, defaults to the system temp directory. **log_level** : :class:`python:int` The logging level to be applied to the server, integer values can be taken from the logging module. By default, ``logging.WARNING`` = 20. **speos_rpc_path** : :obj:`Optional`\[:obj:`Union`\[:class:`python:str`, :obj:`Path`]] Explicit path to the Speos RPC executable or its parent directory. When *None* or empty the function performs automatic discovery. **use_insecure** : :ref:`bool ` Whether to use insecure transport mode for the Speos RPC server. By default, ``False``. :Returns: :obj:`ansys.speos.core.speos.Speos` An instance of the Speos Service. :Raises: :obj:`ValueError` When any numeric parameter cannot be cast to int. :obj:`FileNotFoundError` When no valid Speos RPC installation can be located. .. !! processed by numpydoc !!