Skip to main content

Show local state to users through Echarts.

Project description

Project Logo

Contributor Badge Gitter Badge NPM Badge License Badge Python Badge

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.

Screenshot

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.

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


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

Uploaded Source

Built Distribution

Flask_State-1.1.4-py3-none-any.whl (35.9 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