Refactored, changed to httx and async instead of requests and threads

This commit is contained in:
Julian Müller 2022-08-13 13:15:50 +02:00
parent 56b850dc4f
commit 2d2afe7930
5 changed files with 84 additions and 90 deletions

View file

@ -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