biggr.objects
=============

.. py:module:: biggr.objects


Attributes
----------

.. autoapisummary::

   biggr.objects.API_URL
   biggr.objects.OBJECTS_API_URL
   biggr.objects.IDENTIFIERS_API_URL
   biggr.objects.MODEL_NAMES


Functions
---------

.. autoapisummary::

   biggr.objects.get_raw
   biggr.objects.get
   biggr.objects.get_metabolites_by_identifiers


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

.. py:data:: API_URL
   :value: 'https://biggr.org/api/v3/'


.. py:data:: OBJECTS_API_URL
   :value: 'https://biggr.org/api/v3/objects/'


.. py:data:: IDENTIFIERS_API_URL
   :value: 'https://biggr.org/api/v3/identifiers/'


.. py:data:: MODEL_NAMES

.. py:function:: get_raw(obj_type: Union[str, Type[biggr.models.Base]], obj_id: Union[str, int]) -> Optional[Any]

   Get the raw API request results as a python dictionary.

   Makes the BiGGr API request to obtain object(s) of type `obj_type`. Returns the JSON
   result interpreted as python dictionary.

   :param obj_type: For all possible values, please refer to the BiGGr API documentation at
                    `biggr.org/data_access <https://biggr.org/data_access#data_objects_objects>`__
   :type obj_type: str or the class of the object to be retrieved
   :param obj_id: If `obj_id` is a str, the ID is interpreted as a BiGG ID (this can not be used
                  with all database entities). In the case that `obj_id` is of type int, the ID is
                  interpreted as an internal ID, as used for defining relationships between
                  database entities.
   :type obj_id: str or int


.. py:function:: get(obj_type: Union[str, Type[biggr.models.Base]], obj_id: Union[str, int])

   Get an entity from the BiGGr database and return it as a python object.

   Makes the BiGGr API request to obtain object(s) of type `obj_type`. Returns the JSON
   result interpreted as an instance of the applicable class, as available in the
   `biggr.models` module. Some relations are loaded by default, whilst others are
   loaded automatically when accessed.

   :param obj_type: For all possible values, please refer to the BiGGr API documentation at
                    `biggr.org/data_access <https://biggr.org/data_access#data_objects_objects>`__
   :type obj_type: str or the class of the object to be retrieved
   :param obj_id: If `obj_id` is a str, the ID is interpreted as a BiGG ID (this can not be used
                  with all database entities). In the case that `obj_id` is of type int, the ID is
                  interpreted as an internal ID, as used for defining relationships between
                  database entities.
   :type obj_id: str or int


.. py:function:: get_metabolites_by_identifiers(identifiers: Union[str, Iterable], model_bigg_id: Optional[str] = None)

