8 Best Flask Cookies Libraries

share link

by Dhiren Gala dot icon Updated: Feb 19, 2023

technology logo
technology logo

Guide Kit Guide Kit  

Here are the best open-source Flask cookies libraries for your applications. You can use these mechanisms to store information on client-side web applications through cookies. Also, developers can create, read, modify, and delete cookies easily.


Flask offers a range of libraries that provide an easy way to use server-side sessions, making it easy to work with cookies in web applications. Flask-Session uses cookies to store a session ID on the client-side, while the actual session data is stored on the server-side. These libraries support different backends for session storage, including in-memory, filesystem, and database. Also, they provide a convenient interface for managing cookies, including setting expiration times, HTTP-only flags, and secure flags. While working with Flask libraries, you will find a wide range of functionality, from basic cookie management to more advanced authentication and access control mechanisms.


We have handpicked top and trending open-source Flask cookie libraries for your next project.

Flask-Session:

  • Uses cookies to store a session ID on the client-side.
  • Stores session data on the server-side.
  • Provides a simple way to use server-side sessions in Flask.
  • Supports different backends for session storage, including in-memory, filesystem, and database.

flask-sessionby fengsp

Python doticonstar image 354 doticonVersion:Currentdoticon
License: Others (Non-SPDX)

Server side session extension for Flask

Support
    Quality
      Security
        License
          Reuse

            flask-sessionby fengsp

            Python doticon star image 354 doticonVersion:Currentdoticon License: Others (Non-SPDX)

            Server side session extension for Flask
            Support
              Quality
                Security
                  License
                    Reuse

                      Flask-JWT-Extended:

                      • Used for creating, managing, and verifying JSON Web Tokens (JWTs).
                      • JWTs are used for secure authentication and authorization.
                      • Provides an easy way to set and read JWT cookies in Flask.
                      • Features include token refresh, token revocation, and token expiration.
                      Python doticonstar image 1422 doticonVersion:4.5.2doticon
                      License: Permissive (MIT)

                      An open source Flask extension that provides JWT support (with batteries included)!

                      Support
                        Quality
                          Security
                            License
                              Reuse

                                flask-jwt-extendedby vimalloc

                                Python doticon star image 1422 doticonVersion:4.5.2doticon License: Permissive (MIT)

                                An open source Flask extension that provides JWT support (with batteries included)!
                                Support
                                  Quality
                                    Security
                                      License
                                        Reuse

                                          Flask-Cookie-Manager:

                                          • Used for creating, deleting, and modifying cookies with a few lines of code.
                                          • Provides an easy way to manage cookies in Flask.
                                          • Supports cookie encryption and expiration.
                                          Python doticonstar image 462 doticonVersion:v1.2.1.1doticon
                                          License: Permissive (MIT)

                                          :cookie: Flask Session Cookie Decoder/Encoder

                                          Support
                                            Quality
                                              Security
                                                License
                                                  Reuse

                                                    flask-session-cookie-managerby noraj

                                                    Python doticon star image 462 doticonVersion:v1.2.1.1doticon License: Permissive (MIT)

                                                    :cookie: Flask Session Cookie Decoder/Encoder
                                                    Support
                                                      Quality
                                                        Security
                                                          License
                                                            Reuse

                                                              Flask-Login:

                                                              • Used to set and read cookies for maintaining authentication state.
                                                              • Provides a user authentication system for Flask.
                                                              • Stores user information in a session.

                                                              flask-loginby maxcountryman

                                                              Python doticonstar image 3279 doticonVersion:0.6.2doticon
                                                              License: Permissive (MIT)

                                                              Flask user session management.

                                                              Support
                                                                Quality
                                                                  Security
                                                                    License
                                                                      Reuse

                                                                        flask-loginby maxcountryman

                                                                        Python doticon star image 3279 doticonVersion:0.6.2doticon License: Permissive (MIT)

                                                                        Flask user session management.
                                                                        Support
                                                                          Quality
                                                                            Security
                                                                              License
                                                                                Reuse

                                                                                  Flask-Principal:

                                                                                  • Used to restrict access to different parts of the application.
                                                                                  • Provides role-based access control for Flask applications.
                                                                                  • It uses cookies to store the user's roles and permissions.

                                                                                  flask-principalby mattupstate

                                                                                  Python doticonstar image 467 doticonVersion:Currentdoticon
                                                                                  License: Permissive (MIT)

                                                                                  Identity management for Flask applications

                                                                                  Support
                                                                                    Quality
                                                                                      Security
                                                                                        License
                                                                                          Reuse

                                                                                            flask-principalby mattupstate

                                                                                            Python doticon star image 467 doticonVersion:Currentdoticon License: Permissive (MIT)

                                                                                            Identity management for Flask applications
                                                                                            Support
                                                                                              Quality
                                                                                                Security
                                                                                                  License
                                                                                                    Reuse

                                                                                                      Flask-User:

                                                                                                      • Used to set and read cookies for maintaining the authentication state.
                                                                                                      • Provides a customizable user authentication and management system.
                                                                                                      • It uses cookies to store the user's authentication state.

                                                                                                      Flask-Userby lingthio

                                                                                                      Python doticonstar image 1008 doticonVersion:v0.5.3doticon
                                                                                                      License: Permissive (MIT)

                                                                                                      Customizable User Authorization & User Management: Register, Confirm, Login, Change username/password, Forgot password and more.

                                                                                                      Support
                                                                                                        Quality
                                                                                                          Security
                                                                                                            License
                                                                                                              Reuse

                                                                                                                Flask-Userby lingthio

                                                                                                                Python doticon star image 1008 doticonVersion:v0.5.3doticon License: Permissive (MIT)

                                                                                                                Customizable User Authorization & User Management: Register, Confirm, Login, Change username/password, Forgot password and more.
                                                                                                                Support
                                                                                                                  Quality
                                                                                                                    Security
                                                                                                                      License
                                                                                                                        Reuse

                                                                                                                          Flask-Security:

                                                                                                                          • Used for various security features such as password hashing and protection against brute-force attacks.
                                                                                                                          • Provides authentication and authorization functionalities along with password management and security features.
                                                                                                                          • Supports different authentication methods, such as email/password or OAuth.

                                                                                                                          flask-securityby mattupstate

                                                                                                                          Python doticonstar image 1594 doticonVersion:Currentdoticon
                                                                                                                          License: Permissive (MIT)

                                                                                                                          Quick and simple security for Flask applications

                                                                                                                          Support
                                                                                                                            Quality
                                                                                                                              Security
                                                                                                                                License
                                                                                                                                  Reuse

                                                                                                                                    flask-securityby mattupstate

                                                                                                                                    Python doticon star image 1594 doticonVersion:Currentdoticon License: Permissive (MIT)

                                                                                                                                    Quick and simple security for Flask applications
                                                                                                                                    Support
                                                                                                                                      Quality
                                                                                                                                        Security
                                                                                                                                          License
                                                                                                                                            Reuse

                                                                                                                                              Flask-OpenID:

                                                                                                                                              • Used to implement OpenID authentication for Flask applications.
                                                                                                                                              • Allows users to authenticate with their OpenID provider.
                                                                                                                                              • Provides a simple way to manage user sessions.

                                                                                                                                              flask-openidby mitsuhiko

                                                                                                                                              Python doticonstar image 207 doticonVersion:Currentdoticon
                                                                                                                                              License: Others (Non-SPDX)

                                                                                                                                              Flask-OpenID adds openid support to flask applications

                                                                                                                                              Support
                                                                                                                                                Quality
                                                                                                                                                  Security
                                                                                                                                                    License
                                                                                                                                                      Reuse

                                                                                                                                                        flask-openidby mitsuhiko

                                                                                                                                                        Python doticon star image 207 doticonVersion:Currentdoticon License: Others (Non-SPDX)

                                                                                                                                                        Flask-OpenID adds openid support to flask applications
                                                                                                                                                        Support
                                                                                                                                                          Quality
                                                                                                                                                            Security
                                                                                                                                                              License
                                                                                                                                                                Reuse

                                                                                                                                                                  See similar Kits and Libraries