Code Monkey home page Code Monkey logo

flask-state's Introduction

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

Usage

After the Flask-State is installed, you also need to import JavaScript file and CSS file to bind a convention ID value for your element. In some configurations, you can also choose to modify them.

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 some configurations by reading its 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 ! Please join us.

License

Flask-State is available under the BSD-3-Clause License.

flask-state's People

Contributors

cclauss avatar fesonx avatar greyli avatar harshcasper avatar pindleskiny avatar wwgc avatar xiaoyuecai avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.