Skip to content
Hetnets in Python (relocated from dhimmel/hetio)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
release-notes Rename codebase to use hetnetpy from hetio Jul 10, 2019
.appveyor.yml CI for Windows using AppVeyor (#45) Jul 12, 2019
.travis.yml Update Aug 26, 2015
hetio Style: blacken .py files, CI & pre-commit-hook checks (#46) Jul 12, 2019

Hetnets in Python

Linux Build Status Windows Build status PyPI Latest DOI GitHub issues Code style: black


Hetnetpy is a Python 3 package for creating, querying, and operating on hetnets. This software provides convenient data structures for hetnets, as well as algorithms for edge prediction. It is specifically tailored and streamlined for hetnets compared to other more generic network software. See for additional software packages designed specifically for hetnets.

Package relocation

Note that this package was previousely named hetio, available at the following repositories:

In July 2019, the package was renamed to hetnetpy to more clearly represent its functionality and disambiguiate it from other products.


Hetnets: Hetnets, also called heterogeneous information networks, are graphs with multiple node and edge types. Hetnets are both multipartite and multirelational. They provide a scalable, intuitive, and frictionless structure for data integration.

Purpose: This package provides data structures for hetnets and algorithms for edge prediction. It only supports hetnets, which is its primary advantage compared to other network software. Node/edge attributes and edge directionality are supported.

Impetus: Development originated with a study to predict disease-associated genes and continues with a successive study to repurpose drugs.

Caution: Documentation is currently spotty, testing coverage is moderate, and the API is not fully stable. Contributions are welcome. Please use GitHub Issues for feedback, questions, or troubleshooting.



Please use Python 3.4 or higher. To install the current PyPI version (recommended), run:

pip install hetnetpy

For the latest GitHub version, run:

pip install git+

For development, clone or download-and-extract the repository. Then run pip install --editable . from the repository's root directory. The --editable flag specifies editable mode, so updating the source updates your installation.

Once installed, tests can be executed by running py.test test/ from the repository's root directory.


A Graph object stores a heterogeneous network and relies on the following classes:

  1. Graph
  2. MetaGraph
  3. Edge
  4. MetaEdge

Release instructions

This section is only relevant for project maintainers. Travis CI deployments are used to upload releases to PyPI and GitHub releases. To create a new release, do the following:

  1. Bump the version in

  2. Add a release notes file in release-notes. Format as a commit message that will be used as the GitHub release description.

  3. Run the following commands:

TAG=v`python --version`
git add hetnetpy/ release-notes/$TAG.*
git commit --message "Prepare $TAG release"
git push
git tag --annotate $TAG --file release-notes/$TAG.*
git push upstream $TAG
  1. Recommended: Edit the GitHub release to improve formatting and add a Zenodo badge.
You can’t perform that action at this time.