cobra.io.web.abstract_model_repository#

Provide an abstract base class that describes a remote model repository.

Classes#

AbstractModelRepository

Define an abstract base class that describes a remote model repository.

Module Contents#

class cobra.io.web.abstract_model_repository.AbstractModelRepository(*, url: httpx.URL | str, **kwargs)[source]#

Bases: abc.ABC

Define an abstract base class that describes a remote model repository.

name#

The name of the remote repository.

Type:

str

_progress#
name: str = 'Abstract'#
_url#
property url: httpx.URL#

Return the repository’s URL.

abstractmethod 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