Relative Content

Tag Archive for flask

Why does flask use Jinja2 and not xpath?

I’m just starting out with python and since I’m coming from a PHP background (thus have to adjust my mind to wrap around new concepts) one major question still stands without answer – why does Flask need a template engine?

Converting from a cgi based project to Flask

I have multiple python scripts on a VPS running Apache. These use cgi so I make http calls from my front end (VBA in Excel). I believe that this architecture is not optimal. I have installed Flask and am deciding how to call these scripts from Flask.

Monitoring client activity with Flask

I have a page in Flask that will be requested by a client every couple of seconds, If the client doesn’t request the page after couple of minutes I want to flag this client as disconnected and will run some code. I don’t want to use web-sockets in this case. I was thinking of implementing this by creating a list of clients with ‘last activity’ variable that will be updated every time the client request the page, a thread will check the list every couple of minutes if the ‘last activity’ of the client is too old.