Skip to main content

Faultless AST for Open Biomedical Ontologies in Python.

Project description

fastobo-py Star me

Faultless AST for Open Biomedical Ontologies in Python.

Actions AppVeyor Codecov License Source PyPI Wheel Bioconda Python Versions PyPI - Implementation Changelog Documentation GitHub issues DOI Downloads


fastobo is a Rust library implementing a reliable parser for the OBO file format 1.4. This extension module exports idiomatic Python bindings that can be used to load, edit and serialize ontologies in the OBO format.


If your platform has no pre-built binaries available, you will need to have the Rust compiler installed. See the documentation on to learn how to install Rust on your machine.

Installation is then supported through pip:

$ pip install fastobo --user


An OboDoc instance can be instantiated from a path or from a binary file handle using the fastobo.load function, or from a string using the fastobo.loads function.

import fastobo
obodoc = fastobo.load("../data/ms.obo")

Loading from a gzip file is supported:

import fastobo
import gzip
gzdoc = fastobo.load("../data/cl.obo.gz"))

Comments can be parsed but neither edited nor serialized, because of a limitation with pyo3 (the library used to generate the Python bindings). They are supported in the Rust version of fastobo.


Found a bug ? Have an enhancement request ? Head over to the GitHub issue tracker of the project if you need to report or ask something. If you are filling in on a bug, please include as much information as you can about the issue, and try to recreate the same bug in a simple, easily reproducible situation.

The following people have contributed to this project:


This project was developed by Martin Larralde as part of a Master's Degree internship in the BBOP team of the Lawrence Berkeley National Laboratory, under the supervision of Chris Mungall. Cite this project as:

Larralde M. Developing Python and Rust libraries to improve the ontology ecosystem [version 1; not peer reviewed]. F1000Research 2019, 8(ISCB Comm J):1500 (poster) (

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastobo-0.12.2.tar.gz (21.4 MB view hashes)

Uploaded source

Built Distributions

fastobo-0.12.2-cp311-cp311-win_amd64.whl (1.7 MB view hashes)

Uploaded cp311

fastobo-0.12.2-cp310-cp310-win_amd64.whl (1.7 MB view hashes)

Uploaded cp310

fastobo-0.12.2-cp39-cp39-win_amd64.whl (1.7 MB view hashes)

Uploaded cp39

fastobo-0.12.2-cp38-cp38-win_amd64.whl (1.7 MB view hashes)

Uploaded cp38

fastobo-0.12.2-cp37-cp37m-win_amd64.whl (1.7 MB view hashes)

Uploaded cp37

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page