Skip to content

Clear a session in Flask

There are two ways to clear a Flask session. The most straight-forward way is this:

View Gist on GitHub

You can also iterate over the session keys:

View Gist on GitHub (source)

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.