Python library for COMBINE archives and annotations
Humboldt-Universität zu Berlin, Faculty of Life Science, Institute of Biology, ITB
University of Stuttgart, Institute of Structural Mechanics and Dynamics in Aerospace Engineering
February 2, 2026



# Create archive from file
omex = Omex()
omex.add_entry(
entry_path=Path("results/testomex/models/omex_comp_flat.xml"),
entry=ManifestEntry(location="./model.xml",
format=EntryFormat.SBML, master=False),
)
omex.add_entry(
entry_path=Path("results/testomex/README.md"),
entry=ManifestEntry(
location="./README.md", format=EntryFormat.MARKDOWN, master=False
),
)
omex.to_omex(Path("results/test_from_files.omex"))
console.print(omex)[
ManifestEntry(location='.', format='http://identifiers.org/combine.specifications/omex', master=False),
ManifestEntry(location='./manifest.xml', format='http://identifiers.org/combine.specifications/omex-manifest', master=False),
ManifestEntry(location='./README.md', format='https://purl.org/NET/mediatypes/text/x-markdown', master=False),
ManifestEntry(location='./cc-by-sa-4.0.txt', format='https://purl.org/NET/mediatypes/text/plain', master=False),
ManifestEntry(location='./mit.txt', format='https://purl.org/NET/mediatypes/text/plain', master=False),
ManifestEntry(location='./models/canagliflozin_intestine.xml', format='http://identifiers.org/combine.specifications/sbml.level-3.version-2', master=False),
...
ManifestEntry(location='./figures/canagliflozin_model.png', format='https://purl.org/NET/mediatypes/image/png', master=False)
]from pymetadata.console import console
from pymetadata.identifiers.miriam import BQB, BQM
from pymetadata.core.annotation import RDFAnnotation
for resource in [
"urn:miriam:chebi:CHEBI%3A33699",
"CHEBI:33699",
"chebi/CHEBI:33699",
"https://identifiers.org/chebi/CHEBI:33699",
"http://identifiers.org/CHEBI:33699",
]:
a = RDFAnnotation(qualifier=BQB.IS, resource=resource)
console.print(a)ERROR MIRIAM namespace `cheb` does not exist for `RDFAnnotation(BQB.IS|cheb|CHEB:33699|identifiers.org)`
RDFAnnotation(BQB.IS|cheb|CHEB:33699|identifiers.org)
ERROR Term `CHEBI:X33699` did not match pattern `^CHEBI:\d+$` for collection `chebi`.
RDFAnnotation(BQB.IS|chebi|CHEBI:X33699|identifiers.org)