Skip to content

model.model_resources

Model resources.

Interacting with model resources to retrieve models. This currently includes BioModels, but can easily be extended to other models.

Source dataclass

Source(source, path=None, content=None)

Class for keeping track of the resolved sources.

is_path

is_path()

Check if the source is a Path.

is_content

is_content()

Check if the source is Content.

to_dict

to_dict()

Convert to dict.

Used for serialization.

from_source classmethod

from_source(source, base_dir=None)

Resolve the source string.

is_urn

is_urn(source)

Check if urn source.

is_http

is_http(source)

Check if http source.

model_from_urn

model_from_urn(urn)

Get model string from given URN.

model_from_url

model_from_url(url)

Get model string from given URL.

Handles redirects of the download page.

:param url: :return:

parse_biomodels_mid

parse_biomodels_mid(text)

Parse biomodel id from string.

model_from_biomodels

model_from_biomodels(mid)

Get SBML string from given BioModels identifier.

:param mid: biomodels id :return: SBML string