libsbgn python bindings

SBGN, libsbgn
pip install libsbgnpy==0.2.0


libsbgn-python logo
PyPI version Documentation Status Build Status License (LGPL version 3) DOI Coverage Status

libsbgnpy : Python library for SBGN

Python library to work with SBGN. This library is based on the SBGN XML schema and supports reading, writing and validation of SBGN files. Python >=3.5 is supported. The initial library was generated using generateDS. Additional utility functions for reading, writing and rendering SBGN documents are provided.

Documentation with examples is available at

  • python library
  • SBGN type definitions (GlyphClasses, ArcClasses, Languages)
  • SBGN utility function like writing & reading of files
  • SBGN rendering
  • tests unittests
  • examples/ python examples
  • validation/ validation of SBGN files

To cite libsbgnpy use DOI


The package is available from pypi

pip install libsbgnpy

The latest develop version can be installed via

pip install git+


To report bugs, request features or asking questions please file an issue.


Contributions are very welcome. The easiest way to fix a typo/bug or implement a feature is by following the contribution guidelines.

Software using libsbgnpy

  • Mimoza takes a model in SBML format and visualizes it in several formats (downloadable as a COMBINE archive)


Python Language Bindings

The python language bindings were created from the XML schema using generateDS and than adapted to include GlyphClasses and ArcClasses.

/usr/local/bin/ -o "" -s "" SBGN.xsd

The necessary constraints for GlyphClasses, ArcClasses and Languages were added and some utility functions created.



  • dropping support of python 2.7, 3.4
  • adding support for python 3.7, 3.8
  • fixing render endpoints (#31, #32)
  • fixing documentation builder
  • removing py2 legacy code

v0.1.7 Support for notes and extensions

  • Extension and Notes reading and writing
  • Extension and Notes examples

v0.1.6 Improved testing and documentation


  • py3 support bugfixes
  • SBGN validation with XSD schema
  • update of bindings from latest schema
  • bug fix in writing some attributes


  • support for py2.6, 2.7, 3.4, 3.5
  • continuous integration with travis


  • unittests added
  • x, y, w, d handled as float instead int according to specification


  • initial release

© 2016-2020 Matthias König