Bio2BEL HMDB is a package which allows the user to work with a local sqlite version of the Human Metabolome Database (HMDB).

Next to creating the local database there are also functions provided, which will enrich given Biological Expression Language (BEL) graphs with information about metabolites, proteins and diseases, that is present in HMDB.

HMDB BEL namespaces for these BEL graphs can be written.


Get the Latest

Download the most recent code from GitHub with:

$ python3 -m pip install git+

For Developers

Clone the repository from GitHub and install in editable mode with:

$ git clone
$ cd hmdb
$ python3 -m pip install -e .


1. Create a bio2bel_hmdb.Manager object

>>> from bio2bel_hmdb import Manager
>>> manager = Manager()

2. Create the tables in the database

>>> manager.create_all()

3. Populate the database

This step will take sometime since the HMDB XML data needs to be downloaded, parsed, and fed into the database line by line.

>>> manager.populate()

Indices and tables