https://github.com/yoobool/flask-state
Display machine state using Python3 with Flask.
https://github.com/yoobool/flask-state
flask-extention flask-machine flask-monitor flask-state plugin
Last synced: about 1 month ago
JSON representation
Display machine state using Python3 with Flask.
- Host: GitHub
- URL: https://github.com/yoobool/flask-state
- Owner: yoobool
- License: bsd-3-clause
- Created: 2020-08-25T02:27:29.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-12-15T18:07:56.000Z (over 3 years ago)
- Last Synced: 2025-04-21T18:03:10.489Z (about 1 month ago)
- Topics: flask-extention, flask-machine, flask-monitor, flask-state, plugin
- Language: JavaScript
- Homepage: https://flask-state.herokuapp.com
- Size: 1.73 MB
- Stars: 614
- Watchers: 16
- Forks: 53
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - yoobool/flask-state - Display machine state using Python3 with Flask. (JavaScript)
README

[](https://github.com/yoobool/flask-state/tree/master/.github/ISSUE_TEMPLATE)
[](https://gitter.im/flaskstate/community)
[](https://www.npmjs.com/package/flask-state)
[](https://github.com/yoobool/flask-state/blob/master/LICENSE)
[](https://pypi.org/project/Flask-State/)# Flask-State
English | [简体中文](https://github.com/yoobool/flask-state/blob/master/README.zh-CN.md)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](https://gunicorn.org/))
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](https://flask-state.herokuapp.com/), or head over to the
[tutorial](https://github.com/yoobool/flask-state/wiki/Tutorials) for more instructions.## Installation
Get this plugin from [PyPI](https://pip.pypa.io/en/stable/quickstart/):
```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
```## Usage
### 1. Bind Database Address
```python
from flask_state import DEFAULT_BIND_SQLITE
app.config['SQLALCHEMY_BINDS'] = {DEFAULT_BIND_SQLITE: 'sqlite:///path'}
```### 2. Configure Flask-State
```python
import flask_state
flask_state.init_app(app)
```### 3. Include Imports to Views
```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](https://github.com/yoobool/flask-state/wiki/Configuration).## Contributing
[See the planning document](https://github.com/yoobool/flask-state/wiki/Tutorials#roadmap) for a roadmap and existing feature requests.* Need **help** or have a **general question**? [Post on Reddit Flask State](https://www.reddit.com/r/FlaskState/)
* Found a **bug** or have a **feature request**? [Open an issue](https://github.com/yoobool/flask-state/issues/new).
* Want to **contribute**? [Submit a pull request](https://github.com/yoobool/flask-state/pulls).Flask-State follows the [Contributor Covenant](https://www.contributor-covenant.org/version/1/3/0/code-of-conduct/)
Code of Conduct.## Alternatives
Looking for something else? Try another monitor project:* [Flask-MonitoringDashboard](https://github.com/flask-dashboard/Flask-MonitoringDashboard)
## Community Channel
We're on [Gitter](https://gitter.im/flaskstate/community)! Join the conversation
for more questions and inquiries about this project.## License
Flask-State is available under the BSD-3-Clause License.