I am looking for a Python library or API that facilitates the creation of geo-spatial topologies and is able save them to a portable format, such as TopoJSON or GML.

The main goal is to save space in detailed polygonal topologies, with borders defined only once and shared among adjacent polygons.

https://github.com/mbostock/topojson/wiki

http://wiki.gis.com/wiki/index.php/Geography_Markup_Language#GML_model

Similar questions and discussions