connect#

ansys.sherlock.core.launcher.connect(port=9090, timeout=120, transport_mode='mtls', certs_dir=None, uds_dir=None, uds_id=None)#

Connect to a local instance of Sherlock.

Available Since: 2025R2

Parameters:
port: int, optional

Port number for the connection (ignored if transport_mode is “uds”). Default is 9090.

timeout: int, optional

Maximum time (in seconds) to wait for the connection to Sherlock to be established. Default is 120 seconds.

transport_modestr, optional

See launch_and_connect() for usage.

certs_dir: str, optional

Directory containing the mTLS certificates. Default is “./certs”.

uds_dirstr, optional

Directory for the UDS socket file.

uds_idstr, optional

Optional ID for the UDS socket file.

Returns:
:
Sherlock

The instance of Sherlock.

Return type:

Sherlock

Examples

>>> from ansys.sherlock.core import launcher
>>> ansys_install_path = launcher.launch(
>>>     port=9092, year=2026, release_number=1, transport_mode="wnua")
>>> sherlock = launcher.connect(port=9092, timeout=60, transport_mode="wnua")