fastobo
Faultless AST for Open Biomedical Ontologies in Python.
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 fastobouv
uv add fastobopoetry
poetry add fastoboInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
prontoPronto parses, browses, creates, and exports…
permissive · top 15,000 on PyPI
isa-rwvalProvides Python classes and utilities to read,…
unclear · top 15,000 on PyPI
edam-ontologyProvides a Python-packaged version of the EDAM…
permissive · top 15,000 on PyPI
ast-serializeParses Python source files and serializes their…
permissive · top 1,000 on PyPI
fastarFastar provides high-performance tar archive…
permissive · top 1,000 on PyPI
biontyBionty provides access to and management of…
unclear · top 15,000 on PyPI
bioregistryBioregistry provides a unified Python interface…
permissive · top 15,000 on PyPI
biocReads and writes biomedical text annotation…
permissive · top 15,000 on PyPI
sssomParse, validate, and convert SSSOM (Simple…
permissive · top 15,000 on PyPI
prefixcommonsConverts between CURIEs (compact URI…
permissive · top 15,000 on PyPI