Network ontology with python and mongodb