Book Image

Learning Flask Framework

Book Image

Learning Flask Framework

Overview of this book

Table of Contents (17 chapters)
Learning Flask Framework
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Installing Flask-Login


Flask-Login is a lightweight extension that handles logging users in and out of the site. From the project's documentation, Flask-Login will do the following:

  • Log users in and out of the site

  • Restrict views to the logged-in users

  • Manage cookies and the "remember me" functionality

  • Help protect user session cookies from being stolen

On the other hand, Flask-Login will not do the following:

  • Make any decisions about the storage of user accounts

  • Manage usernames, passwords, OpenIDs, or any other form of credentials

  • Handle tiered permissions or anything beyond logged in or logged out

  • Account registration, activation, or password reminders

The takeaway from these lists is that Flask-Login can best be thought of as a session manager. It simply manages user sessions and lets us know which user is making a request, and whether that user is logged in or not.

Let's get started. Use pip to install Flask-Login:

(blog) $ pip install Flask-Login
Downloading/unpacking Flask-Login
...
Successfully...