Implementing Session Timeout within Flask

Implementing the timeout Scattered across the internet are a few examples that are no longer valid in 2021, when implementing Flask web apps in Python. This is a short example to show something working in 2021. See the following code that uses the @app.before_request function to implement the session timeout: import datetime from flask import Flask, session, g from datetime import timedelta from flask_login import current_user app = Flask(__name__) @app.before_request def before_request(): session....

July 6, 2021 · 3 min · Me

Sending audio data from Raspberry Pi to InfluxDB and visualising using Grafana

Summary In this blog post I’m going to show you how you can grab a live data feed from ReSpeaker on Raspberry Pi, put that into influxDB and then finally query and visualise the data using Grafana. Setting up ReSpeaker on the Raspberry Pi Having just picked up a brand new ReSpeaker 4 mic array I needed to try it out: ReSpeaker 4 mic array for Raspberry Pi Having followed this helpful tutorial I managed to install the drivers required for the connectivity via the GPIO pins on the Pi....

April 28, 2021 · 5 min · Me