Giter Site home page Giter Site logo

sbcmeter's Introduction

Notes from miguelgrinberg guide

Part 1

  • one "peculiarity is that the routes module is imported at the bottom and not at the top of the script as it is always done. The bottom import is a workaround to circular imports, a common problem with Flask applications."
  • routes module: "The routes are the different URLs that the application implements. In Flask, handlers for the application routes are written as Python functions, called view functions"
  • running application: flask run

Templates

  • keep the logic of your application separate from the layout or presentation of your web pages

Creating App With D3 Elements

Serving static files

systemd

  • list services and status

  • check status : systemctl status temp_monitor

  • stop service: sudo systemctl stop temp_monitor

  • delete service: sudo systemctl disable temp_monitor

  • rm sym links $ rm /etc/systemd/system/*servicename $ rm /usr/lib/systemd/system/*servicename

$ sudo systemctl daemon-reload

To do:

[ ] script to set up systemd process [ ] cli [ ]

cli commands:, guide: here

  • system setup
    • chmod +x rbpi_monitor/system_setup/service_setup.sh
  • system list diag services
  • system check service status
  • system stop service

resources

https://medium.com/@brotandgames/build-a-custom-cli-with-bash-e3ce60cfb9a4

https://blog.logrocket.com/build-interactive-charts-flask-d3js https://benalexkeen.com/creating-graphs-using-flask-and-d3/ https://sentry.io/answers/serve-static-files-flask/

manual set up

  • add config file as follows:
PIMON_DIR=/home/USERNAME/rbpi_monitor

to do

  • front end on local D3
  • configure port so that app is available to specific IP (set in config file)

sbcmeter's People

Contributors

rivera-lanasm avatar

Watchers

 avatar

sbcmeter's Issues

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.