Another redis monitor by using flask, angular, socket.io

Overview

RedisPAPA

we use redis info to monitor the redis usage. PAPA means a father who is monitoring the redis.

accoding to the redis doc, it is be recommanded to use info other than monitor.

================

repo

中文文档

Let's start

  • pip install -r requirements.txt
  • check out the file config.py and make your own configure accoding to your redis servers.
  • the REDIS_SERVER should be formated like this ['ip:port:password', 'ip:port', .....]
  • type this command python run.py, then you can watch it in http://127.0.0.1:5000
  • we recommand use this command to deploy: gunicorn --worker-class socketio.sgunicorn.GeventSocketIOWorker run:app -b 0.0.0.0:5000

The tech we use

Demo website

http://redispapa.no13bus.com

Project Details

  • we do not use any database to store the redis information, we store the data in the memory.
  • we use flask to start serveral threads which is equal to your redis server amount,and then send infomation to the front-end at regular time by socket.io.
  • we use angular to render the front-end。angular will get the data from socket.io and then render the templates with highchart-ng and ngSocketIO.
  • the good part of angular is two way bindings, when you change the redis server ip in the front-end select element, you will get a new front-end immediately.

Project Screen

1 2 3 version 0.2 version 0.2

Version 0.3

  • docker support: you can pull the docker image of redispapa from docker hub

    docker pull sinchb/redispapa
    

    to start a redispapa instance with default settings:

    docker run -p 5000:5000 sinchb/redispapa
    

    If you want to use your own config.py:

    docker run -p 5000:5000 -v /path/to/config.py:/root/redispapa/config.py sinchb/redispapa
    

    If you want to build your own docker image, please clone this repo, and run:

    cd /path/to/your/redispapa/
    docker build -t=your-redispapa-tag .
    

Version 0.2

  • new feature: exectute redis commands in the website.
  • In the website, you can type set in command input box, and type a, papapa in args input box or you can type get in command input box, and type a in `args input box. Then you can get the result from the redis server.

Version 0.1

supply kinds of information of redis server

The links

You might also like...
A Fast API style support for Flask. Gives you MyPy types with the flexibility of flask
A Fast API style support for Flask. Gives you MyPy types with the flexibility of flask

Flask-Fastx Flask-Fastx is a Fast API style support for Flask. It Gives you MyPy types with the flexibility of flask. Compatibility Flask-Fastx requir

Flask-app scaffold, generate flask restful backend

Flask-app scaffold, generate flask restful backend

Flask pre-setup architecture. This can be used in any flask project for a faster and better project code structure.

Flask pre-setup architecture. This can be used in any flask project for a faster and better project code structure. All the required libraries are already installed easily to use in any big project.

Pf-flask-rest-com - Flask REST API Common Implementation by Problem Fighter Library

In the name of God, the Most Gracious, the Most Merciful. PF-Flask-Rest-Com Docu

Flask-Discord-Bot-Dashboard - A simple discord Bot dashboard created in Flask Python
Flask-Discord-Bot-Dashboard - A simple discord Bot dashboard created in Flask Python

Flask-Discord-Bot-Dashboard A simple discord Bot dashboard created in Flask Pyth

Open-source Flask Sample built on top of flask-dance library
Open-source Flask Sample built on top of flask-dance library

Open-source Flask Sample built on top of flask-dance library. The project implements the social login for Github and Twitter - Originally coded by TestDriven.IO.

Flask-redmail - Email sending for Flask

Flask Red Mail: Email Sending for Flask Flask extension for Red Mail What is it?

Flask Sitemapper is a small Python 3 package that generates XML sitemaps for Flask applications.

Flask Sitemapper Flask Sitemapper is a small Python 3 package that generates XML sitemaps for Flask applications. This allows you to create a nice and

Flask-template - A simple template for make an flask api

flask-template By GaGoU :3 a simple template for make an flask api notes: you ca

Comments
  • JS文件失效了

    JS文件失效了

    http://7xi88w.com1.z0.glb.clouddn.com/tipover.js http://7xi88w.com1.z0.glb.clouddn.com/ng-socket-io.js http://7xi88w.com1.z0.glb.clouddn.com/highcharts-ng.js

    这3个文件失效了,打大一片空白

    opened by taoistwar 1
  • KeyError

    KeyError

    Got an KeyError Ubuntu 14.04

    linuxdev3@linuxdev3:~/open/redispapa$ fg
    python run.py
    
    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 327, in run
        result = self._run(*self.args, **self.kwargs)
      File "/usr/local/lib/python2.7/dist-packages/socketio/virtsocket.py", line 403, in _receiver_loop
        retval = pkt_ns.process_packet(pkt)
      File "/usr/local/lib/python2.7/dist-packages/socketio/namespace.py", line 155, in process_packet
        return self.process_event(packet)
      File "/usr/local/lib/python2.7/dist-packages/flask_socketio/__init__.py", line 60, in process_event
        return self.socketio._dispatch_message(app, self, message, args)
      File "/usr/local/lib/python2.7/dist-packages/flask_socketio/__init__.py", line 135, in _dispatch_message
        ret = self.messages[namespace.ns_name][message](*args)
      File "run.py", line 165, in client_command
        args = message['args']
    KeyError: 'args'
    <Greenlet at 0x7f13fe143b90: <bound method Socket._receiver_loop of <socketio.virtsocket.Socket object at 0x7f13fded34d0>>> failed with KeyError
    
    opened by sinchb 1
  • Bump flask from 0.10.1 to 1.0

    Bump flask from 0.10.1 to 1.0

    Bumps flask from 0.10.1 to 1.0.

    Release notes

    Sourced from flask's releases.

    1.0

    The Pallets team is pleased to release Flask 1.0. [Read the announcement on our blog.](https://www.palletsprojects.com/blog/flask-1-0-released/

    There are over a year's worth of changes in this release. Many features have been improved or changed. Read the changelog to understand how your project's code will be affected.

    JSON Security Fix

    Flask previously decoded incoming JSON bytes using the content type of the request. Although JSON should only be encoded as UTF-8, Flask was more lenient. However, Python includes non-text related encodings that could result in unexpected memory use by a request.

    Flask will now detect the encoding of incoming JSON data as one of the supported UTF encodings, and will not allow arbitrary encodings from the request.

    Install or Upgrade

    Install from PyPI with pip:

    pip install -U Flask
    

    0.12.4

    This is a repackage of 0.12.3 to fix an issue with how the package was built.

    Upgrade

    Upgrade from PyPI with pip. Use a version identifier if you want to stay at 0.12:

    pip install -U 'Flask~=0.12.4'
    

    0.12.3

    This release includes an important security fix for JSON and a minor backport for CLI support in PyCharm. It is provided for projects that cannot update to Flask 1.0 immediately. See the 1.0 announcement and update to it instead if possible.

    JSON Security Fix

    Flask previously decoded incoming JSON bytes using the content type of the request. Although JSON should only be encoded as UTF-8, Flask was more lenient. However, Python includes non-text related encodings that could result in unexpected memory use by a request.

    Flask will now detect the encoding of incoming JSON data as one of the supported UTF encodings, and will not allow arbitrary encodings from the request.

    Upgrade

    Upgrade from PyPI with pip. Use a version identifier if you want to stay at 0.12:

    pip install -U 'Flask~=0.12.3'
    
    ... (truncated)
    Changelog

    Sourced from flask's changelog.

    Version 1.0

    Released 2018-04-26

    • Python 2.6 and 3.3 are no longer supported.
    • Bump minimum dependency versions to the latest stable versions: Werkzeug >= 0.14, Jinja >= 2.10, itsdangerous >= 0.24, Click >= 5.1. :issue:2586
    • Skip :meth:app.run <Flask.run> when a Flask application is run from the command line. This avoids some behavior that was confusing to debug.
    • Change the default for :data:JSONIFY_PRETTYPRINT_REGULAR to False. :func:~json.jsonify returns a compact format by default, and an indented format in debug mode. :pr:2193
    • :meth:Flask.__init__ <Flask> accepts the host_matching argument and sets it on :attr:~Flask.url_map. :issue:1559
    • :meth:Flask.__init__ <Flask> accepts the static_host argument and passes it as the host argument when defining the static route. :issue:1559
    • :func:send_file supports Unicode in attachment_filename. :pr:2223
    • Pass _scheme argument from :func:url_for to :meth:~Flask.handle_url_build_error. :pr:2017
    • :meth:~Flask.add_url_rule accepts the provide_automatic_options argument to disable adding the OPTIONS method. :pr:1489
    • :class:~views.MethodView subclasses inherit method handlers from base classes. :pr:1936
    • Errors caused while opening the session at the beginning of the request are handled by the app's error handlers. :pr:2254
    • Blueprints gained :attr:~Blueprint.json_encoder and :attr:~Blueprint.json_decoder attributes to override the app's encoder and decoder. :pr:1898
    • :meth:Flask.make_response raises TypeError instead of ValueError for bad response types. The error messages have been improved to describe why the type is invalid. :pr:2256
    • Add routes CLI command to output routes registered on the application. :pr:2259
    • Show warning when session cookie domain is a bare hostname or an IP address, as these may not behave properly in some browsers, such as Chrome. :pr:2282
    • Allow IP address as exact session cookie domain. :pr:2282
    • SESSION_COOKIE_DOMAIN is set if it is detected through SERVER_NAME. :pr:2282
    • Auto-detect zero-argument app factory called create_app or make_app from FLASK_APP. :pr:2297
    • Factory functions are not required to take a script_info parameter to work with the flask command. If they take a single parameter or a parameter named script_info, the
    ... (truncated)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump vite from 2.9.9 to 2.9.13 in /frontend

    Bump vite from 2.9.9 to 2.9.13 in /frontend

    Bumps vite from 2.9.9 to 2.9.13.

    Changelog

    Sourced from vite's changelog.

    2.9.13 (2022-06-27)

    2.9.12 (2022-06-10)

    • fix: outdated optimized dep removed from module graph (#8534) (c0d6c60), closes #8534

    2.9.11 (2022-06-10)

    2.9.10 (2022-06-06)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies javascript 
    opened by dependabot[bot] 0
Owner
no13bus
KEEP
no13bus
Socket.IO integration for Flask applications.

Flask-SocketIO Socket.IO integration for Flask applications. Installation You can install this package as usual with pip: pip install flask-socketio

Miguel Grinberg 4.1k Feb 17, 2021
flask-apispec MIT flask-apispec (🥉24 · ⭐ 520) - Build and document REST APIs with Flask and apispec. MIT

flask-apispec flask-apispec is a lightweight tool for building REST APIs in Flask. flask-apispec uses webargs for request parsing, marshmallow for res

Joshua Carp 617 Dec 30, 2022
Are-You-OK is a Flask-based, responsive Web App to monitor whether the Internet Service you care about is still working.

Are-You-OK Are-You-OK is a Flask-based, responsive Web App to monitor whether the Internet Service you care about is still working. Demo-Preview Get S

Tim Qiu 1 Oct 28, 2021
flask-reactize is a boostrap to serve any React JS application via a Python back-end, using Flask as web framework.

flask-reactize Purpose Developing a ReactJS application requires to use nodejs as back end server. What if you want to consume external APIs: how are

Julien Chomarat 4 Jan 11, 2022
Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application.

Flask-Bcrypt Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application. Due to the recent increased prevelance of

Max Countryman 310 Dec 14, 2022
Flask-Rebar combines flask, marshmallow, and swagger for robust REST services.

Flask-Rebar Flask-Rebar combines flask, marshmallow, and swagger for robust REST services. Features Request and Response Validation - Flask-Rebar reli

PlanGrid 223 Dec 19, 2022
Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application.

Flask-Bcrypt Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application. Due to the recent increased prevelance of

Max Countryman 282 Feb 11, 2021
Flask-Starter is a boilerplate starter template designed to help you quickstart your Flask web application development.

Flask-Starter Flask-Starter is a boilerplate starter template designed to help you quickstart your Flask web application development. It has all the r

Kundan Singh 259 Dec 26, 2022
Brandnew-flask is a CLI tool used to generate a powerful and mordern flask-app that supports the production environment.

Brandnew-flask is still in the initial stage and needs to be updated and improved continuously. Everyone is welcome to maintain and improve this CLI.

brandonye 4 Jul 17, 2022
Flask Project Template A full feature Flask project template.

Flask Project Template A full feature Flask project template. See also Python-Project-Template for a lean, low dependency Python app. HOW TO USE THIS

Bruno Rocha 96 Dec 23, 2022