cobra.core.object
=================

.. py:module:: cobra.core.object

.. autoapi-nested-parse::

   Define base Object class in Cobra.



Classes
-------

.. autoapisummary::

   cobra.core.object.Object


Module Contents
---------------

.. py:class:: Object(id: Optional[str] = None, name: str = '')

   Defines common behavior of object in cobra.core.


   .. py:attribute:: _id
      :value: None



   .. py:attribute:: name
      :value: ''



   .. py:attribute:: notes


   .. py:attribute:: _annotation


   .. py:property:: id
      :type: str


      Get the Object id.

      :returns: **id**
      :rtype: str


   .. py:method:: _set_id_with_model(value) -> None

      Set id with model.

      This appears to be a stub so it can be modified in dependant classes.

      :param value: The string to set the id to.
      :type value: str



   .. py:property:: annotation
      :type: dict


      Get annotation dictionary.

      :returns: **_annotation** -- Returns _annotation as a dictionary.
      :rtype: dict


   .. py:method:: __getstate__() -> dict

      Get state of annotation.

      To prevent excessive replication during deepcopy, ignores _model in state.

      :returns: **state** -- Dictionary of state, excluding _model.
      :rtype: dict



   .. py:method:: __repr__() -> str

      Return string representation of Object, with class.

      :returns: Composed of class.name, id and hexadecimal of id.
      :rtype: str



   .. py:method:: __str__() -> str

      Return string representation of object.

      :returns: Object.id as string.
      :rtype: str



