:class:`PartStub`
=================


.. py:class:: ansys.speos.core.kernel.part.PartStub(channel)

   Bases: :py:obj:`ansys.speos.core.kernel.crud.CrudStub`


   
   Database interactions for part.


   :Parameters:

       **channel** : :obj:`grpc.Channel`
           Channel to use for the stub.













   .. rubric:: 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()

   ..
       !! processed by numpydoc !!


.. py:currentmodule:: PartStub

Overview
--------

.. tab-set::



   .. tab-item:: Methods

      .. list-table::
          :header-rows: 0
          :widths: auto

          * - :py:attr:`~create`
            - Create a new entry.
          * - :py:attr:`~read`
            - Get an existing entry.
          * - :py:attr:`~update`
            - Change an existing entry.
          * - :py:attr:`~delete`
            - Remove an existing entry.
          * - :py:attr:`~list`
            - List existing entries.








Import detail
-------------

.. code-block:: python

    from ansys.speos.core.kernel.part import PartStub



Method detail
-------------

.. py:method:: create(message)

   
   Create a new entry.


   :Parameters:

       **message** : :obj:`part.Part`
           Datamodel for the new entry.



   :Returns:

       :obj:`ansys.speos.core.kernel.part.PartLink`
           Link object created.











   ..
       !! processed by numpydoc !!

.. py:method:: read(ref)

   
   Get an existing entry.


   :Parameters:

       **ref** : :obj:`ansys.speos.core.kernel.part.PartLink`
           Link object to read.



   :Returns:

       :obj:`part.Part`
           Datamodel of the entry.











   ..
       !! processed by numpydoc !!

.. py:method:: update(ref, data)

   
   Change an existing entry.


   :Parameters:

       **ref** : :obj:`ansys.speos.core.kernel.part.PartLink`
           Link object to update.

       **data** : :obj:`part.Part`
           New datamodel for the entry.














   ..
       !! processed by numpydoc !!

.. py:method:: delete(ref)

   
   Remove an existing entry.


   :Parameters:

       **ref** : :obj:`ansys.speos.core.kernel.part.PartLink`
           Link object to delete.














   ..
       !! processed by numpydoc !!

.. py:method:: list()

   
   List existing entries.





   :Returns:

       :obj:`List`\[:obj:`ansys.speos.core.kernel.part.PartLink`]
           Link objects.











   ..
       !! processed by numpydoc !!