Registry / serialization / fastobo

fastobo

JSON →
library0.14.1pypypi✓ verified 81d ago

Faultless AST for Open Biomedical Ontologies (OBO) in Python. Version 0.14.1 provides robust parsing, manipulation, and serialization of OBO files, with optional OWL export. Released regularly, with pre-built wheels for many platforms.

pip install fastobo
INSTALL
IMPORT
SIG · FASTOBO
F
fastobo
serializationpythonv0.14.1
Install
1.7s avg
Import
Disk
23MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.14.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.7s · import 0.000s · 26MB
23MB installed
● package 23MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

OboDoc
from fastobo import doc
from fastobo import OboDoc
load
from fastobo import load
dump_graph
from fastobo import dump_graph

Load and iterate over an OBO ontology file.

from fastobo import load # Load an OBO file (use a test file or URL) doc = load('go.obo') # Iterate over all frames for frame in doc: # Frames have an 'id' and 'name' attribute print(frame.id, frame.name) # Convert to OWL (requires fastobo-owl, install separately) # from fastobo import dump_owl # dump_owl(doc, 'go.owl')
fastobo --version
Debug
Known issues
gotchaSome frame attributes (e.g., 'name') may be None if not defined in the OBO file. Always check for None before use.
fix
frame.name or ''
affects: all
deprecatedSupport for Python 3.6 removed in v0.12.0; requires Python >=3.7.
fix
Upgrade Python to >=3.7
affects: >=0.12.0
gotchaThe OWL export functionality (dump_owl) is only available if the fastobo-owl dependency is installed (not included by default).
fix
pip install fastobo[owl] or pip install fastobo-owl
affects: >=0.11.0
gotchaWhen loading from a file, the file must be a Path-like object or a string; streams are not supported directly. Use load(open(...)) may fail because load expects a filename or path string, not a file handle.
fix
doc = load('/path/to/file.obo') # Do not pass file handle
affects: all
breakingIn v0.12.0, the GIL is no longer released when loading from a file on Windows; this may affect performance but fixes compilation.
fix
No action needed unless relying on concurrency; upgrade to latest
affects: 0.12.0+
Upgrade
Version history
0.14.1latest on PyPI · released Oct 25, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
12
Resources
fastobo — pip install fastobo · libregistry