WestHealth / pyvis

Python package for creating and visualizing interactive network graphs.
http://pyvis.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
998 stars 169 forks source link

The js / css resources are not read from local drive but from cdn with cdn_resources="in_line" #229

Open fohrloop opened 1 year ago

fohrloop commented 1 year ago

Using pyvis 0.3.2

Steps to reproduce:

# script.py
from pyvis.network import Network
nt = Network(
    cdn_resources="in_line",
)
nt.show('network.html', notebook=False)

The output draws content from

niko@niko-ubuntu:~/tmp/pyvis_tests$ cat network.html | grep 'href=\"http\|src=\"http' -C 5
</center>

<!-- <link rel="stylesheet" href="../node_modules/vis/dist/vis.min.css" type="text/css" />
<script type="text/javascript" src="../node_modules/vis/dist/vis.js"> </script>-->
        <link
          href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css"
          rel="stylesheet"
          integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
          crossorigin="anonymous"
        />
        <script
          src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
          integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
          crossorigin="anonymous"
        ></script>
fohrloop commented 1 year ago

Closely related to: https://github.com/WestHealth/pyvis/issues/228 Related PR: https://github.com/WestHealth/pyvis/pull/201