cobra.io.web.biomodels_repository
=================================

.. py:module:: cobra.io.web.biomodels_repository

.. autoapi-nested-parse::

   Provide functions for loading metabolic models over the wire.



Classes
-------

.. autoapisummary::

   cobra.io.web.biomodels_repository.BioModelsFile
   cobra.io.web.biomodels_repository.BioModelsFilesResponse
   cobra.io.web.biomodels_repository.BioModels


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

.. py:class:: BioModelsFile(/, **data: Any)

   Bases: :py:obj:`pydantic.BaseModel`


   Define a single BioModels file description.


   .. py:attribute:: name
      :type:  str


   .. py:attribute:: size
      :type:  int
      :value: None



.. py:class:: BioModelsFilesResponse(/, **data: Any)

   Bases: :py:obj:`pydantic.BaseModel`


   Define the BioModels files JSON response.


   .. py:attribute:: main
      :type:  List[BioModelsFile]
      :value: []



.. py:class:: BioModels(**kwargs)

   Bases: :py:obj:`cobra.io.web.abstract_model_repository.AbstractModelRepository`


   Define a concrete implementation of the BioModels repository.

   .. attribute:: name

      The name of the BioModels repository.

      :type: str


   .. py:attribute:: name
      :type:  str
      :value: 'BioModels'



   .. py:method:: get_sbml(model_id: str) -> bytes

      Attempt to download an SBML document from the repository.

      :param model_id: The identifier of the desired metabolic model. This is typically repository
                       specific.
      :type model_id: str

      :returns: A gzip-compressed, UTF-8 encoded SBML document.
      :rtype: bytes

      :raises httpx.HTTPError: In case there are any connection problems.



