LocalServer#
- class LocalServer#
Provides startup utilities for a local Additive server.
Overview#
Launch a local gRPC server for the Additive service. |
|
Find an open port on the local host. |
Import detail#
from ansys.additive.core.server_connection.local_server import LocalServer
Method detail#
- static LocalServer.launch(port: int, cwd: str = USER_DATA_PATH, product_version: str = DEFAULT_PRODUCT_VERSION) subprocess.Popen #
Launch a local gRPC server for the Additive service.
- Parameters:
- port: int
Port number to use for gRPC connections.
- cwd: str
Current working directory to use for the server process.
- product_version: str
Version of the Ansys installation to use, of the form
"YYR"
, whereYY
is the two digit year andR
is the release for that year. For example, Ansys 2024 R1 would be"241"
.
- Returns:
- process:
subprocess.Popen
Server process. To stop the server, call the
kill()
method on the returned object.
- process: