connect#
- Service.connect(url: str = 'http://localhost:8000', username: str = 'nexus', password: str = 'cei', session: str | None = '') None #
Connect to a running service.
- Parameters:
- url
str
,optional
URL for the service. The default is
http://localhost:8000
.- username
str
,optional
Username for the service. The default is
"nexus"
.- password
str
,optional
Password for the service. The default is
"cei"
.- session
str
,optional
GUID for the session to work with. The default is
""
, in which case a new session with its own GUID is created. All created items are then pushed on this session. Visualizations are all filtered so that only items for this session are shown.
- url
- Raises:
NotValidServer
The current Service doesn not have a valid server associated to it.
Examples
import ansys.dynamicreporting.core as adr adr_service = adr.Service(ansys_installation = r'C:\Program Files\ANSYS Inc\v232') ret = adr_service.connect(url="http://localhost:8010", username='admin', password = 'mypsw')