cobra.io.web.biomodels_repository#
Provide functions for loading metabolic models over the wire.
Classes#
Define a single BioModels file description. |
|
Define the BioModels files JSON response. |
|
Define a concrete implementation of the BioModels repository. |
Module Contents#
- class cobra.io.web.biomodels_repository.BioModelsFile(/, **data: Any)[source]#
Bases:
pydantic.BaseModelDefine a single BioModels file description.
- class cobra.io.web.biomodels_repository.BioModelsFilesResponse(/, **data: Any)[source]#
Bases:
pydantic.BaseModelDefine the BioModels files JSON response.
- main: List[BioModelsFile] = []#
- class cobra.io.web.biomodels_repository.BioModels(**kwargs)[source]#
Bases:
cobra.io.web.abstract_model_repository.AbstractModelRepositoryDefine a concrete implementation of the BioModels repository.
- 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:
- Raises:
httpx.HTTPError – In case there are any connection problems.
RuntimeError – If the model’s file listing contains no SBML document, for example when the model is only deposited as a COMBINE (OMEX) archive.