cobra.io.web.biomodels_repository#

Provide functions for loading metabolic models over the wire.

Classes#

BioModelsFile

Define a single BioModels file description.

BioModelsFilesResponse

Define the BioModels files JSON response.

BioModels

Define a concrete implementation of the BioModels repository.

Module Contents#

class cobra.io.web.biomodels_repository.BioModelsFile(/, **data: Any)[source]#

Bases: pydantic.BaseModel

Define a single BioModels file description.

name: str#
size: int = None#
class cobra.io.web.biomodels_repository.BioModelsFilesResponse(/, **data: Any)[source]#

Bases: pydantic.BaseModel

Define the BioModels files JSON response.

main: List[BioModelsFile] = []#
class cobra.io.web.biomodels_repository.BioModels(**kwargs)[source]#

Bases: cobra.io.web.abstract_model_repository.AbstractModelRepository

Define a concrete implementation of the BioModels repository.

name#

The name of the BioModels repository.

Type:

str

name: str = 'BioModels'#
get_sbml(model_id: str) bytes[source]#

Attempt to download an SBML document from the repository.

Parameters:

model_id (str) – The identifier of the desired metabolic model. This is typically repository specific.

Returns:

A gzip-compressed, UTF-8 encoded SBML document.

Return type:

bytes

Raises:

httpx.HTTPError – In case there are any connection problems.