npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

flask-state

v1.1.4

Published

Flask-States is a visual plug-in based on flask. It can record the local state every minute and read the status of redis if you have configured redis,and generate data chart to show to users through Echarts.

Downloads

22

Readme

Project Logo

Contributor Badge Gitter Badge NPM Badge License Badge Python Badge

Flask-State

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/[email protected]/packages/umd/flask-state.min.js"></script>
<link href="https://cdn.jsdelivr.net/gh/yoobool/[email protected]/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.