An extensive set of examples can be found on the PyBEL Notebooks repository on GitHub. These notebooks contain basic usage and also make numerous references to the analytical package PyBEL Tools


The default connection string can be set as an environment variable in your ~/.bashrc. If you’re using MySQL or MariaDB, it could look like this:

$ export PYBEL_CONNECTION="mysql+pymysql://user:password@server_name/database_name?charset=utf8"

Command Line


The command line wrapper might not work on Windows. Use python3 -m pybel if it has issues.

PyBEL automatically installs the command pybel. This command can be used to easily compile BEL documents and convert to other formats. See pybel --help for usage details. This command makes logs of all conversions and warnings to the directory ~/.pybel/.

Prepare a Cytoscape Network

Load, compile, and export to Cytoscape format:

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

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

Get the latest PyBEL Suite

Here is a list of all of the things you can install:

python3 -m pip uninstall pybel_web_validator
python3 -m pip uninstall pybel_tools
python3 -m pip uninstall pybel
python3 -m pip install git+
python3 -m pip install git+
python3 -m pip install git+