Flask-States is a visual plug-in based on flask. It can record the local state every minute and read the status of redis if you have configured redis,and generate data chart to show to users through Echarts.
npm install flask-state




Flask-State is a lightweight chart plugin for displaying machine state data in your web application.
* Monitored Metric: CPU, memory, disk usage, disk IO, Network IO, LoadAVG and boot time.
* Extensible: Offers rich customization options, including redis monitoring, user authentication,
custom logging, i18n and etc.
* Stable: Solves multiprocessing concurrency problems (if you use gunicorn)
built on top of lightweight dependencies.
This project is in active development and thoroughly tested to ensure that Flask-State
stays up-to-date with its project roadmap.
Check out the live demo, or head over to the
tutorial for more instructions.
Get this plugin from PyPI:
``bash`
pip install Flask-State
Alternatively, install Flask-State via NPM or include this script tag to the head
section of your HTML document:
`html`
`bash`
npm install flask-state --save
`python`
from flask_state import DEFAULT_BIND_SQLITE
app.config['SQLALCHEMY_BINDS'] = {DEFAULT_BIND_SQLITE: 'sqlite:///path'}
`python`
import flask_state
flask_state.init_app(app)
`javascript``
// requires echarts module
import 'echarts';
import 'flask-state/flask-state.min.css';
import {init} from 'flask-state';
// Create a DOM node with ID 'test'. After init() binds the node,
// click to open the listening window
init({dom:document.getElementById('test')});
Learn more about advanced configurations in the
documentation.
* Need help or have a general question? Post on Reddit Flask State
* Found a bug or have a feature request? Open an issue.
* Want to contribute? Submit a pull request.
Flask-State follows the Contributor Covenant
Code of Conduct.
We're on Gitter! Join the conversation
for more questions and inquiries about this project.
Flask-State is available under the BSD-3-Clause License.