17.1.1.3.1.1.1.3. cobra.io.web.biomodels_repository

Provide functions for loading metabolic models over the wire.

17.1.1.3.1.1.1.3.1. Module Contents

17.1.1.3.1.1.1.3.1.1. 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(__pydantic_self__, **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(__pydantic_self__, **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(self, 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.