Skip to main content

Flask blueprint that provides all the user handling features that are required by a web application in a database-independent way, including user registration, login, session management, password reset functionality with JWTs, automatic password hashing with Argon2 and of course the all the required route implementations with the corresponding HTML templates (styled using BlueprintJS).

Project description

# Flask user handler blueprint

Flask blueprint that provides all the user handling features that are required by a web application in a database-independent way, including:

The blueprint provides the following routes for a web application: /login, /logout, /register, /request_password_reset and /reset/<token>. All these routes interact with the user database through an instance of the UserHandler class that is a decorator-based database interface, similar to Flask-Login’s LoginManager. All the blueprint routes are backed by ready-to-use HTML templates that are formatted using [BlueprintJS](http://blueprintjs.com/docs/v2/).

## How to use

The blueprint requires the following components to be configured:

  • blueprint.user_handler: See the documentation of the UserHandler class for the details.

  • LoginManager: This Flask-Login component handles the session management of the Flask application. You need to create an instance of this class and configure it according to the documentation of Flask-Login.

A working demo Flask application showing all the described configuration is included in the library, see demo.py.

## Dependencies

The library requires the following dependencies to be installed.

  • Flask-Login: User session management.

  • Passlib: Password hashing and verification.

  • Argon2_cffi: The preferred Argon2 backend for Passlib. See Passlib’s documentation for more options.

## License - MIT

The library is open-sourced under the conditions of the MIT [license](https://choosealicense.com/licenses/mit/).

## Credit

Miguel Grinberg’s [Flask Mega-Tutorial](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

user_blueprint-0.1.1-py3-none-any.whl (9.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page