A simple flask wrapper for the famous visjs library.
Project description
Flask-VisJS
Flask-VisJS is a simple wrapper for the famous visjs java library. It helps you to integrate the library into your flask app.
Installation
pip install Flask-VisJS
Example
from flask import Flask, render_template_string
from flask_visjs import VisJS4, Network
app = Flask(__name__)
VisJS4().init_app(app)
@app.route('/')
def index():
net = Network("500px", "500px")
net.add_node(0, label="Node 0")
return render_template_string("""
<html>
<head>
{{ net.inject_css() }}
</head>
<body>
{{ net.inject_graph() }}
{{ net.inject_js() }}
</body>
</html>
""", net=net)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Flask-VisJS-0.1.2.tar.gz
(184.3 kB
view hashes)
Built Distribution
Flask_VisJS-0.1.2-py3-none-any.whl
(185.8 kB
view hashes)
Close
Hashes for Flask_VisJS-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53ca3a5649db384424b612d65e84b44c5cf25f83db0e599a93e1370e1a5cd590 |
|
MD5 | 2ff9bbd4785dc7b73cce804a8c75ede9 |
|
BLAKE2b-256 | b56988511ff818c900912eadd6df425e407f0871ddf3274213a48d9e7eab8eb9 |