Client
#
- class ansys.mechanical.core.embedding.rpc.client.Client(host: str, port: int, timeout: float = 120.0)#
Client for connecting to Mechanical services.
Overview#
Close the connection. |
|
Upload a file to the server. |
|
Download a file from the server. |
|
Download all project files in the working directory of the Mechanical instance. |
|
Shuts down the Mechanical instance. |
Check if the Mechanical instance is alive. |
Get attribute from the root object. |
Import detail#
from ansys.mechanical.core.embedding.rpc.client import Client
Property detail#
- property Client.is_alive#
Check if the Mechanical instance is alive.
Attribute detail#
- Client.host#
- Client.port#
- Client.timeout#
- Client.connection = None#
- Client.root = None#
Method detail#
- Client.__getattr__(attr)#
Get attribute from the root object.
- Client.close()#
Close the connection.
- Client.upload(file_name, file_location_destination=None, chunk_size=DEFAULT_CHUNK_SIZE, progress_bar=False)#
Upload a file to the server.
- Client.download(files, target_dir=None, chunk_size=DEFAULT_CHUNK_SIZE, progress_bar=None, recursive=False)#
Download a file from the server.
- Client.download_project(extensions=None, target_dir=None, progress_bar=False)#
Download all project files in the working directory of the Mechanical instance.
- Client.exit()#
Shuts down the Mechanical instance.