corneto.io.import_cobra_model#

corneto.io.import_cobra_model(path, quiet=True, *, compression='auto', timeout=30.0)#

Import a COBRA model from an SBML file and convert it to a CORNETO graph.

Parameters:
  • path (str | PathLike | BinaryIO) – SBML path, HTTP(S) URL, or binary readable stream

  • quiet (bool) – Suppress output from the COBRApy reader.

  • compression (str | None) – "auto" detects and decompresses gzip, bz2, or xz by magic bytes; None disables decompression, and an explicit codec forces it. ZIP archives are passed to COBRApy’s SBML reader, which reads only the first member of a multi-file archive.

  • timeout (float) – HTTP request timeout in seconds.

Return type:

Graph

Paths, URLs, and streams are materialized in a temporary file for COBRApy; caller-owned sources are not modified or closed.

Returns:

A CORNETO graph representing the metabolic network

Return type:

Graph

Parameters: