Just sharing stuff…
It did take me some time to figure out how to obtain a node’s attribute is using Python’s graph-tool package. In this example, we have a directed graph
g with a vertex property called `label`. To extract this information per node, the following code snippet would do.
for v in g.vertices(): indegree = v.in_degree() label = g.vertex_properties["label"][v]