https://github.com/dadav/flask-visjs
https://flask-visjs.readthedocs.io/en/latest/
https://github.com/dadav/flask-visjs
flask hacktoberfest visjs
Last synced: about 1 month ago
JSON representation
https://flask-visjs.readthedocs.io/en/latest/
- Host: GitHub
- URL: https://github.com/dadav/flask-visjs
- Owner: dadav
- License: bsd-3-clause
- Created: 2022-04-23T12:51:59.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-16T05:50:17.000Z (over 3 years ago)
- Last Synced: 2025-03-07T21:03:36.051Z (about 1 year ago)
- Topics: flask, hacktoberfest, visjs
- Language: Python
- Homepage:
- Size: 332 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flask-VisJS

[](https://pypi.org/project/Flask-VisJS/)
[](https://github.com/dadav/Flask-VisJS/actions/)
[](https://codecov.io/gh/dadav/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
```bash
pip install Flask-VisJS
```
## Configuration
Please use [https://flask-visjs.readthedocs.io/en/latest/](https://flask-visjs.readthedocs.io/en/latest/)
Work in progress...
## Example
```python
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")
net.add_node(1, label="Node 1")
net.add_edge(0, 1)
return render_template_string("""
{{ net.inject_css() }}
{{ net.inject_js() }}
{{ net.inject_graph() }}
""", net=net)
```
[Go to the example folder](./examples/)