skip to navigation
skip to content

PyBEL 0.10.1

Parsing, validation, and data exchange of BEL graphs

PyBEL is a Python package for parsing and handling biological networks encoded in the Biological Expression Language (BEL). It also facilitates data interchange between common formats and databases such as NetworkX, JSON, CSV, SIF, Cytoscape, CX, NDEx, SQL, and Neo4J.

Its companion package, PyBEL Tools, contains a suite of functions and workflows for analyzing the resulting biological networks.


If you use PyBEL in your work, we ask that you please cite:

Hoyt et al., 2017. PyBEL: a computational framework for Biological Expression Language. Bioinformatics, btx660,

Getting Started

In this example, the Selventa Small Corpus is loaded and visualized in a Jupyter Notebook.

>>> import pybel, pybel_tools
>>> graph = pybel.from_url('')
>>> graph.number_of_nodes()  # Will be smaller than expected because we have the most strict settings enabled
>>> pybel_tools.visualization.to_jupyter(graph)

More examples can be found in the documentation and in the PyBEL Notebooks repository.

PyBEL also installs a command line interface with the command pybel for simple utilities such as data conversion. In this example, a BEL Script is exported to GraphML for viewing in Cytoscape.

$ pybel convert --path ~/Desktop/example.bel --graphml ~/Desktop/example.graphml

In Cytoscape, open with Import > Network > From File.


PyBEL can be installed easily from PyPI with the following code in your favorite terminal:

$ python3 -m pip install pybel

or from the latest code on GitHub with:

$ python3 -m pip install git+

See the installation documentation for more advanced instructions. Also, check the change log at CHANGELOG.rst.


Contributions, whether filing an issue, making a pull request, or forking, are appreciated. See CONTRIBUTING.rst for more information on getting involved. Please add your name to AUTHORS.rst!


File Type Py Version Uploaded on Size
PyBEL-0.10.1-py2.py3-none-any.whl (md5) Python Wheel py2.py3 2017-12-28 163KB
PyBEL-0.10.1.tar.gz (md5) Source 2017-12-28 397KB