Basic project stats.

This commit is contained in:
grossmj committed 2018-03-15 15:21:29 +07:00
1 parent 90ce6093d8
commit fb3bcf3b8f
2 files changed
+24

No files matched your search

+9
View File
@@ -1013,6 +1013,15 @@ class Project:
raise e
return new_node
def stats(self):
return {
"nodes": len(self._nodes),
"links": len(self._links),
"drawings": len(self._drawings),
"snapshots": len(self._snapshots)
}
def __json__(self):
return {
"name": self._name,