Skip to main content

A CNML parser for Python

Project description


libcnml is a CNML parser library for Python.

[![Travis libcnml](]( [![Pypi libcnml](]( [![Downloads libcnml](](

It was part of the [ Studio]( project developed by Pablo Castellano during Google Summer of Code 2012.

What is CNML

Community Network Mark Up Language (CNML) is a project that aims to define an open ISO standard and scalable for describing mesh clouds, though it’s not limited to this kind of networks and nowadays it’s being used also in point to point infrastructure networks.

CNML is a specification based on XML, which makes it easily extendible and readable for humans besides of computers. It includes some ideas from other implementations and previous concepts like nodeXchange and SNDX.

Some advantages of using CNML is that it allows to uncouple different functionalities independently of the web application used to show the data, reducing dependence from it and its internal tables of the database.

You can read more about it on: - -


You can install it by typing:

python install

or you can get it from PYPI by using pip:

pip install libcnml

Optionally you can also install lxml (read the note below):

sudo apt-get install libxml2-dev libxslt1-dev pip install lxml

libcnml is also available in the Fedora/RHEL/CentOS/Scientific Linux [repositories](


lxml Python library does a better memory management and is faster than minidom (default XML library in Python). If you want to manage big sets of nodes like World zone this definitely makes the difference.

For example, these are the results opening a World zone with more than 17.000 nodes: Minidom took ~23 seconds and 1,4GB RAM. Guifinetstudio window didn’t even appear. I had to reboot my laptop. Lxml took ~4s and 284MB RAM. Guifinetstudio worked, moving through the map is difficult but possible.

You can test it by your own:

$ cat from libcnml import * c = CNMLParser(‘tests/detail’)

$ time python Using lxml which is more efficient Loaded OK

real 0m3.974s user 0m3.728s sys 0m0.188s

$ time python lxml module not found. Falling back to minidom Loaded OK

real 0m22.984s user 0m21.997s sys 0m0.868s


The code license is GPLv3+

Project details

Release history Release notifications

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
libcnml-0.9.5-py2.py3-none-any.whl (39.7 kB) Copy SHA256 hash SHA256 Wheel 3.4 Jul 15, 2016
libcnml-0.9.5.tar.gz (46.3 kB) Copy SHA256 hash SHA256 Source None Jul 15, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page