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.

TravisCI License Source PyPI Wheel Python Versions PyPI - Implementation Changelog Documentation GitHub issues

Overview

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.

Installation

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

Installation is then supported through pip:

$ pip install fastobo --user

Usage

An OboDoc instance can be instantiated from a file-handle 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(gzip.open("../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.

Feedback

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.

About

This project is currently being 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.

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.1.1.tar.gz (234.9 kB view hashes)

Uploaded Source

Built Distributions

fastobo-0.1.1-cp37-cp37m-manylinux1_x86_64.whl (981.9 kB view hashes)

Uploaded CPython 3.7m

fastobo-0.1.1-cp37-cp37m-macosx_10_13_x86_64.whl (889.5 kB view hashes)

Uploaded CPython 3.7m macOS 10.13+ x86-64

fastobo-0.1.1-cp36-cp36m-manylinux1_x86_64.whl (982.0 kB view hashes)

Uploaded CPython 3.6m

fastobo-0.1.1-cp36-cp36m-macosx_10_13_x86_64.whl (888.8 kB view hashes)

Uploaded CPython 3.6m macOS 10.13+ x86-64

fastobo-0.1.1-cp35-cp35m-manylinux1_x86_64.whl (981.6 kB view hashes)

Uploaded CPython 3.5m

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page