PartStub#
- class ansys.speos.core.kernel.part.PartStub(channel)#
Bases:
ansys.speos.core.kernel.crud.CrudStubDatabase interactions for part.
- Parameters:
- channel
grpc.Channel Channel to use for the stub.
- channel
Examples
The best way to get a PartStub is to retrieve it from SpeosClient via parts() method. Like in the following example:
>>> from ansys.speos.core.speos import Speos >>> speos = Speos(host="localhost", port=50098) >>> part_db = speos.client.parts()
Overview#
Import detail#
from ansys.speos.core.kernel.part import PartStub
Method detail#
- PartStub.create(message)#
Create a new entry.
- Parameters:
- message
part.Part Datamodel for the new entry.
- message
- Returns:
ansys.speos.core.kernel.part.PartLinkLink object created.
- PartStub.read(ref)#
Get an existing entry.
- Parameters:
- ref
ansys.speos.core.kernel.part.PartLink Link object to read.
- ref
- Returns:
part.PartDatamodel of the entry.
- PartStub.update(ref, data)#
Change an existing entry.
- Parameters:
- ref
ansys.speos.core.kernel.part.PartLink Link object to update.
- data
part.Part New datamodel for the entry.
- ref
- PartStub.delete(ref)#
Remove an existing entry.
- Parameters:
- ref
ansys.speos.core.kernel.part.PartLink Link object to delete.
- ref
- PartStub.list()#
List existing entries.
- Returns:
List[ansys.speos.core.kernel.part.PartLink]Link objects.