Show local state to users through Echarts.
Project description
Flask-State
Flask-State is a lightweight chart plugin to show machine state.
- Monitoring indicators: CPU, Memory, Disk usage, LoadAVG, Boot time.
- Extensible: It has rich options for extended functions, including redis monitoring, user authentication, custom logging, i18n and etc.
- Stable: Lightweight dependencies, meanwhile solving multi-progress concurrency problems (if you use gunicorn).
Flask-State is an active project, well-tested and complete update roadmap.
Documentation
To check out live example, and visit tutorials doc.
Installation
Install and update using pip:
$ pip install Flask-State
Display components can use <script>
tag from a CDN, or as a flask-state package on npm.
<script src="https://cdn.jsdelivr.net/gh/yoobool/flask-state@v1.0.5/packages/umd/flask-state.min.js"></script>
npm install flask-state --save
Usage
Firstly:Bind database address.
from flask_state import DEFAULT_BIND_SQLITE
app.config['SQLALCHEMY_BINDS'] = {DEFAULT_BIND_SQLITE: 'sqlite:///path'}
Secondly:Call the init_app method of the flask-state to initialize the configuration.
import flask_state
flask_state.init_app(app)
Thirdly:Import the view file.
// npm
// Need to introduce 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 by reading documentation.
Contributing
Welcome to open an issue!
Flask-State follows the Contributor Covenant Code of Conduct.
Community Channel
We're on Gitter ! Please join us.
License
Flask-State is available under the BSD-3-Clause License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Flask-State-1.0.5.tar.gz
(14.4 kB
view hashes)
Built Distribution
Close
Hashes for Flask_State-1.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66dded69742d2c220ea8315b215ed7c68438855590aa589035edab282f071be3 |
|
MD5 | 9b91adad07cc6f10e7f7779a4396b0e1 |
|
BLAKE2b-256 | c5905d11f9a5c01a0edcdfa455b8ebbd5e30c0a604fb5e4e4d3d28dedc3bbdcf |