Show local state to users through Echarts.
Project description
Flask-State
English | 简体中文
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.
Documentation
Check out the live demo, or head over to the tutorial for more instructions.
Installation
Get this plugin from PyPI:
pip install Flask-State
Alternatively, install Flask-State via NPM or include this script tag to the head section of your HTML document:
<script src="https://cdn.jsdelivr.net/gh/yoobool/flask-state@v1.1.4/packages/umd/flask-state.min.js"></script>
<link href="https://cdn.jsdelivr.net/gh/yoobool/flask-state@v1.1.4/packages/flask-state.min.css" rel="stylesheet">
npm install flask-state --save
Usage
1. Bind Database Address
from flask_state import DEFAULT_BIND_SQLITE
app.config['SQLALCHEMY_BINDS'] = {DEFAULT_BIND_SQLITE: 'sqlite:///path'}
2. Configure Flask-State
import flask_state
flask_state.init_app(app)
3. Include Imports to Views
// 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.
Contributing
See the planning document for a roadmap and existing feature requests.
- 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.
Alternatives
Looking for something else? Try another monitor project:
Community Channel
We're on Gitter! Join the conversation for more questions and inquiries about this project.
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
Built Distribution
File details
Details for the file Flask-State-1.1.4.tar.gz
.
File metadata
- Download URL: Flask-State-1.1.4.tar.gz
- Upload date:
- Size: 23.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec16b81e677fc308790f90bf05ee32935062e70fe301d69582712f9b99b9ac88 |
|
MD5 | 54dd3e6429c89b723987e8559a31836b |
|
BLAKE2b-256 | bffbe447ecebf17bd32c76f015b29850c3b28451194946e3a9c688df0a68f36f |
File details
Details for the file Flask_State-1.1.4-py3-none-any.whl
.
File metadata
- Download URL: Flask_State-1.1.4-py3-none-any.whl
- Upload date:
- Size: 35.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76bdeb7f9b2e28b3d5540ab01f7b7004dd13caa2ea0562baa1a828de12794ff7 |
|
MD5 | d7b30705e2195f882fa203cb02218325 |
|
BLAKE2b-256 | 7297c4993ca5e58dbc2de11a1842df5a75158417a00387f321bfba9e37d8575b |