Refactored, changed to httx and async instead of requests and threads
This commit is contained in:
parent
56b850dc4f
commit
2d2afe7930
5 changed files with 84 additions and 90 deletions
|
@ -1,14 +1,11 @@
|
|||
|
||||
|
||||
from pyvis.network import Network
|
||||
|
||||
from .linkmap import LinkMap
|
||||
|
||||
|
||||
def pyvis_graph_from_linkmap(linkmap:LinkMap, heading:str=None) -> Network:
|
||||
|
||||
pyvis_net = Network(bgcolor="#222222", font_color="#fafafa", width="100%", height="95%", directed=True)
|
||||
|
||||
pyvis_net.add_nodes(linkmap.links, size=[8]*len(linkmap.links))
|
||||
pyvis_net.add_edges(linkmap.link_connections)
|
||||
|
||||
|
@ -66,6 +63,5 @@ def pyvis_graph_from_linkmap(linkmap:LinkMap, heading:str=None) -> Network:
|
|||
|
||||
# pyvis_net.show_buttons()
|
||||
pyvis_net.set_options(pyvis_options)
|
||||
|
||||
return pyvis_net
|
||||
|
||||
|
|
Reference in a new issue