ffmap-backend/alfred.py
2015-03-24 18:31:23 +01:00

20 lines
326 B
Python

import subprocess
import json
def _fetch(data_type):
output = subprocess.check_output(["alfred-json", "-z", "-f", "json", "-r", str(data_type)])
return json.loads(output.decode("utf-8")).values()
def nodeinfo():
return _fetch(158)
def statistics():
return _fetch(159)
def vis():
return _fetch(160)