cobra.io.web.biomodels_repository

Provide functions for loading metabolic models over the wire.

Module Contents

Classes

BioModelsFile

Define a single BioModels file description.

BioModelsFilesResponse

Define the BioModels files JSON response.

BioModels

Define a concrete implementation of the BioModels repository.

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

Bases: pydantic.BaseModel

Define a single BioModels file description.

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

Bases: pydantic.BaseModel

Define the BioModels files JSON response.

main: List[BioModelsFile] = [][source]
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[source]

The name of the BioModels repository.

Type

str

name: str = 'BioModels'[source]
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.