Launch Sherlock#
To launch Sherlock, use the
launch_and_connect()
method. This method automatically searches for the latest version of Sherlock installed locally if
the version isn’t specified in the parameters. It then launches the Sherlock gRPC server on
the port specified. If a port is not specified, port 9090 is used.
This method also launches a Sherlock client connected to the same port and
returns a sherlock gRPC connection object that can be used to invoke the APIs from their
respective services.
This code starts the Sherlock gRPC server on the default port:
from ansys.sherlock.core import launcher
sherlock, install_dir = launcher.launch_and_connect()
This code uses the optional port parameter to start the Sherlock gRPC server on port
11000:
from ansys.sherlock.core import launcher
sherlock = launcher.launch_and_connect(port=11000)
You can use the Common.check()
method to perform a health check on the sherlock gRPC connection object:
sherlock.common.check()