skillfed

fastobo

Faultless AST for Open Biomedical Ontologies in Python.

fastobo v0.14.1 122.5K downloads/30d#11,947 on PyPI33
Permissive license AGING released

What it is and what it does

fastobo is a Python extension wrapping a Rust library that parses the OBO (Open Biomedical Ontology) file format 1.4. It provides idiomatic Python bindings to load ontology files into an abstract syntax tree (AST), modify them programmatically, and serialize them back to OBO format. The library supports both plain text and gzip-compressed OBO files and exposes a simple API: `fastobo.load()` for file paths or file handles, and `fastobo.loads()` for strings.

The package is intended for bioinformaticians, ontology curators, and researchers working with biomedical ontologies from the OBO Foundry or similar sources. It requires no runtime Python dependencies but is a compiled extension, so installation may require a Rust compiler if pre-built wheels are unavailable for your platform. The project is maintained but aging, with the last release over 9 months old.

Use it for:

  • Load and parse OBO ontology files for programmatic access to ontology structure and metadata.
  • Edit ontology definitions, terms, and relationships in memory, then serialize back to OBO format.
  • Integrate OBO ontology data into bioinformatics pipelines or knowledge graph construction workflows.
  • Validate OBO file syntax and structure by parsing and inspecting the resulting AST.
  • Process gzip-compressed ontology archives without manual decompression.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Parses, loads, edits, and serializes OBO (Open Biomedical Ontology) format files via Python bindings to a Rust parser, supporting both plain and gzip-compressed files.

Yes, if you need to work with OBO format ontologies in Python. The package is stable (Beta status), has no known vulnerabilities, supports modern Python versions (3.7–3.14), and carries a permissive MIT license. Install friction is moderate due to compilation requirements on some platforms, but pre-built wheels cover common environments. The aging maintenance status (last release 293 days ago) is a minor concern for long-term support but not a blocker for current use.

Install

fastobo on PyPI

pip

pip install fastobo

uv

uv add fastobo

poetry

poetry add fastobo

Installing fastobo

Before you install

Medium install friction: compiled extension requiring Rust toolchain if pre-built wheels unavailable for your platform. Wheels cover Python 3.10–3.13 on macOS (arm64, x86_64), Linux (aarch64, x86_64), and Windows; older Python versions (3.7–3.9) may require compilation. Last release 293 days ago; repository active but aging.

License in practice

MIT license (permissive); no restrictions on use, modification, or distribution in commercial or private projects.

Quickstart

pip install fastobo

import fastobo
obodoc = fastobo.load("ontology.obo")

# or from gzip
import gzip
gzdoc = fastobo.load(gzip.open("ontology.obo.gz"))

Rust compiler may be required if pre-built wheels are unavailable for your Python version and platform; see installation documentation at rust-lang.org.

Verify before relying

  • Whether pre-built wheels are reliably available for all supported Python versions on all major platforms, or how often compilation is required in practice.
  • Performance characteristics or memory footprint when parsing large ontology files.
  • Completeness of OBO 1.4 format support and any known parsing edge cases or limitations.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.7)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance aging — 293 days since the last release
Last repo commit
First released
Downloads 122,536/month — #11,947 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: fastobo-0.14.1-cp310-cp310-macosx_11_0_arm64.whl; fastobo-0.14.1-cp310-cp310-macosx_12_0_x86_64.whl; fastobo-0.14.1-cp310-cp310-manylinux_2_28_aarch64.whl; fastobo-0.14.1-cp310-cp310-manylinux_2_28_x86_64.whl; fastobo-0.14.1-cp310-cp310-win_amd64.whl; fastobo-0.14.1-cp311-cp311-macosx_11_0_arm64.whl; fastobo-0.14.1-cp311-cp311-macosx_12_0_x86_64.whl; fastobo-0.14.1-cp311-cp311-manylinux_2_28_aarch64.whl; fastobo-0.14.1-cp311-cp311-manylinux_2_28_x86_64.whl; fastobo-0.14.1-cp311-cp311-win_amd64.whl; fastobo-0.14.1-cp312-cp312-macosx_11_0_arm64.whl; fastobo-0.14.1-cp312-cp312-macosx_12_0_x86_64.whl; fastobo-0.14.1-cp312-cp312-manylinux_2_28_aarch64.whl; fastobo-0.14.1-cp312-cp312-manylinux_2_28_x86_64.whl; fastobo-0.14.1-cp312-cp312-win_amd64.whl; fastobo-0.14.1-cp313-cp313-macosx_11_0_arm64.whl; fastobo-0.14.1-cp313-cp313-macosx_12_0_x86_64.whl; fastobo-0.14.1-cp313-cp313-manylinux_2_28_aarch64.whl; fastobo-0.14.1-cp313-cp313-manylinux_2_28_x86_64.whl; fastobo-0.14.1-cp313-cp313-win_amd64.whl

Keywords: ontologies, ontology, obo, obofoundry, parser, syntax, ast

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Healthcare IndustryIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: RustTopic :: Scientific/Engineering :: Bio-InformaticsTopic :: Scientific/Engineering :: Medical Science Apps.Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

obo file parser pythonontology format parsingbiomedical ontology loaderobo document astobofoundry parserontology serializationobo format reader
ontology-parsingbiomedical-informaticsrust-binding

More Python Modules packages