SpeosClient#
- class ansys.speos.core.kernel.client.SpeosClient(host=DEFAULT_HOST, port=DEFAULT_PORT, version=DEFAULT_VERSION, channel=None, message_size=MAX_CLIENT_MESSAGE_SIZE, remote_instance=None, timeout=60, logging_level=logging.INFO, logging_file=None, speos_install_path=None)#
- Wraps a speos gRPC connection. - Parameters:
- hoststr,optional
- Host where the server is running. By default, - DEFAULT_HOST.
- portUnion[str,int],optional
- Port number where the server is running. By default, - DEFAULT_PORT.
- channelChannel,optional
- gRPC channel for server communication. By default, - None.
- message_size: int
- Maximum Message size of a newly generated channel By default, - MAX_CLIENT_MESSAGE_SIZE.
- remote_instanceansys.platform.instancemanagement.Instance
- The corresponding remote instance when the Speos Service is launched through PyPIM. This instance will be deleted when calling - SpeosClient.close.
- timeoutReal,optional
- Timeout in seconds to achieve the connection. By default, 60 seconds. 
- logging_levelint,optional
- The logging level to be applied to the client. By default, - INFO.
- logging_fileOptional[str,Path]
- The file to output the log, if requested. By default, - None.
- speos_install_pathOptional[str,Path]
- location of Speos rpc executable 
 
- host
- Parameters:
- host (Optional[str]) 
- version (str) 
- channel (Optional[grpc.Channel]) 
- message_size (int) 
- remote_instance (Optional[ansys.platform.instancemanagement.Instance]) 
- timeout (Optional[int]) 
- logging_level (Optional[int]) 
- logging_file (Optional[Union[pathlib.Path, str]]) 
- speos_install_path (Optional[Union[pathlib.Path, str]]) 
 
 
Overview#
| Get the target of the channel. | |
| Get face database access. | |
| Get body database access. | |
| Get part database access. | |
| Get sop template database access. | |
| Get vop template database access. | |
| Get spectrum database access. | |
| Get intensity template database access. | |
| Get source template database access. | |
| Get sensor template database access. | |
| Get simulation template database access. | |
| Get scene database access. | |
| Get job database access. | |
| Get items from keys. | |
| Close the channel. | 
| Get item from key. | |
| Represent the client as a string. | 
Import detail#
from ansys.speos.core.kernel.client import SpeosClient
Property detail#
- property SpeosClient.channel: grpc.Channel#
- The gRPC channel of this client. 
- property SpeosClient.log: ansys.speos.core.logger.PySpeosCustomAdapter#
- The specific instance logger. 
Method detail#
- SpeosClient.target()#
- Get the target of the channel. 
- SpeosClient.faces()#
- Get face database access. 
- SpeosClient.bodies()#
- Get body database access. 
- SpeosClient.parts()#
- Get part database access. 
- SpeosClient.sop_templates()#
- Get sop template database access. 
- SpeosClient.vop_templates()#
- Get vop template database access. 
- SpeosClient.spectrums()#
- Get spectrum database access. 
- SpeosClient.intensity_templates()#
- Get intensity template database access. 
- SpeosClient.source_templates()#
- Get source template database access. 
- SpeosClient.sensor_templates()#
- Get sensor template database access. 
- SpeosClient.simulation_templates()#
- Get simulation template database access. 
- SpeosClient.scenes()#
- Get scene database access. 
- SpeosClient.jobs()#
- Get job database access. 
- SpeosClient.__getitem__(key)#
- Get item from key. - Parameters:
- keystr
- Key of the item (also named guid). 
 
- key
- Returns:
- Union[- ansys.speos.core.kernel.sop_template.SOPTemplateLink,- ansys.speos.core.kernel.vop_template.VOPTemplateLink,- ansys.speos.core.kernel.spectrum.SpectrumLink,- ansys.speos.core.kernel.intensity_template.IntensityTemplateLink,- ansys.speos.core.kernel.source_template.SourceTemplateLink,- ansys.speos.core.kernel.sensor_template.SensorTemplateLink,- ansys.speos.core.kernel.simulation_template.SimulationTemplateLink,- ansys.speos.core.kernel.scene.SceneLink,- ansys.speos.core.kernel.job.JobLink,- ansys.speos.core.kernel.part.PartLink,- ansys.speos.core.kernel.body.BodyLink,- ansys.speos.core.kernel.face.FaceLink,- None]
- Link object corresponding to the key - None if no objects corresponds to the key. 
 
 
- SpeosClient.get_items(keys, item_type)#
- Get items from keys. - Parameters:
- Returns:
- Union[- List[- ansys.speos.core.kernel.sop_template.SOPTemplateLink],- List[- ansys.speos.core.kernel.vop_template.VOPTemplateLink],- List[- ansys.speos.core.kernel.spectrum.SpectrumLink],- List[- ansys.speos.core.kernel.intensity_template.IntensityTemplateLink],- List[- ansys.speos.core.kernel.source_template.SourceTemplateLink],- List[- ansys.speos.core.kernel.sensor_template.SensorTemplateLink],- List[- ansys.speos.core.kernel.simulation_template.SimulationTemplateLink],- List[- ansys.speos.core.kernel.scene.SceneLink],- List[- ansys.speos.core.kernel.job.JobLink],- List[- ansys.speos.core.kernel.part.PartLink],- List[- ansys.speos.core.kernel.body.BodyLink],- List[- ansys.speos.core.kernel.face.FaceLink]]
- List of Link objects corresponding to the keys - Empty if no objects corresponds to the keys. 
 
 
- SpeosClient.__repr__()#
- Represent the client as a string. 
 
    