How to make alerts in Python Flask

Heya, so I need to make my Flask site send an alert on my site but I don’t exactly know how. I mean… I have a rough idea but I don’t know how to actually put it into action.

Does flash function works for you?

You can the use function and after that you fetch the alert in the html.

There’s a good example here:

try flash as WindLother said, and if that doesn’t work for you use socketio. The flask_socketio in particular is really easy to use.


Do you mean a pop up? Tha is more up to your CSS library than a flask thing.