17.1.1.3.1.1.1.4. cobra.io.web.cobrapy_repository

Provide functions for loading metabolic models from local package data.

17.1.1.3.1.1.1.4.1. Module Contents

17.1.1.3.1.1.1.4.1.1. Classes

Cobrapy

Define a concrete implementation of the cobrapy (local package) repository.

class cobra.io.web.cobrapy_repository.Cobrapy(**kwargs)[source]

Bases: cobra.io.web.abstract_model_repository.AbstractModelRepository

Define a concrete implementation of the cobrapy (local package) repository.

Attributes

namestr

The name of the Cobrapy repository.

name :str = Cobrapy[source]
get_sbml(self, model_id: str) → bytes[source]

Attempt to open an SBML document from the local 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