#!/usr/bin/env python3 from notiframe import Notiframe import os from flask import Flask, render_template, request, redirect, url_for, send_file app = Flask(__name__) mydir = os.path.dirname(os.path.abspath(__file__)) mgr = Notiframe.Manager() @app.route('//get_image', methods=['GET']) #when requesting this http endpoint, use eg. /2y7d8s9k/get_image with '2y7d8s9k' being the device id def display(device_id): img = mgr.get_image(device_id) return send_file(img) if __name__ == '__main__': app.run(debug=True, host='0.0.0.0')