Skip to main content

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.

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.4/packages/umd/flask-state.min.js"></script>
npm install flask-state --save

Documentation

To check out live example, and visit tutorials doc.

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
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


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.4.tar.gz (11.6 kB view hashes)

Uploaded Source

Built Distribution

Flask_State-1.0.4-py3-none-any.whl (17.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page