cytoscape / ipycytoscape

A Cytoscape Jupyter widget
https://ipycytoscape.readthedocs.io/en/master/
BSD 3-Clause "New" or "Revised" License
269 stars 62 forks source link

add_graph_from_json should accept a path to a file #210

Open ianhi opened 3 years ago

ianhi commented 3 years ago

It would be great if add_graph_from_json accepted either a dict or a str. If a str it should be interpreted as a path to a json file and the method should do something like:

import json
with open(json_file) as f:
    json_file = json.load(f)