Flask-User v0.5

https://pypip.in/v/Flask-User/badge.png _images/build_passing.png https://pypip.in/d/Flask-User/badge.png _images/BSD_license.png

Customizable User Account Management for Flask

So you’re writing a Flask web application and would like to authenticate your users.
You start with a simple Login page, but soon enough you need to handle:
  • Registrations and Email Confirmations
  • Change Usernames, Change Passwords, and Forgotten Passwords

And wouldn’t it be nice to also offer:

  • Role-based Authorization
  • Remember-me cookies
  • Multiple emails per user
  • Internationalization
Flask-User offers these user features (and more) out-of-the-box
while also honoring the following developer needs:
  • Reliable (Code coverage of over 95%)
  • Secure (Built on top of widely deployed Flask-Login)
  • Ready to use (Through sensible defaults)
  • Largely configurable (Through configuration settings)
  • Fully customizable (Through customizable functions and email templates)
  • Well documented
  • Tested on Python 2.6, 2.7, 3.3 and 3.4

Status

Flask-User v0.5 is quite stable and is used in production environments.
It is marked as a Beta release because the API is subject to small changes.
We appreciate it if you would enter issues and enhancement requests into the Flask-User Issue Tracker.

Demo

The Flask-User Demo showcases Flask-User. To protect against spam mis-use, all email features have been disabled. (If you’re the first visitor in the last hour, it may take a few seconds for Heroku to start this service)

Contact Information

Ling Thio - ling.thio [at] gmail.com

Feeling generous? Tip me on Gittip

Up Next

Installation

Revision History

  • v0.5.5 Added user_profile view. Cleaned up base template. Support for UserProfile.roles.
  • v0.5.4 Decoupled Flask-User from Flask-Babel and speaklater
  • v0.5.3
    • Added remember-me feature.
    • Added support for a primary key name other than ‘id’.
    • Added USER_AUTO_LOGIN_... settings.
    • Added USER_AFTER_..._ENDPOINT settings.
    • Cleaned up email templates.
v0.5.3 API changes
The 'confirm_email' emails are now sent only after a resend confirm email request.
The 'registered' email is now sent after registration, whether
USER_ENABLE_CONFIRM_EMAIL is True or False.

(Previously, the 'confirm_email' email was sent after registration
and after a resend confirm email request, and the 'registered' email was sent only
after registration and when USER_ENABLE_CONFIRM_EMAIL was False)
  • v0.5.2 Added USER_AUTO_LOGIN setting.
  • v0.5.1 Added Support for multiple emails per user.
  • v0.5.0 Added resend_confirm_email.
  • v0.4.9 Added login_or_register.html. Cleaned up example_apps.
  • v0.4.8 Removed the need for app.mail, app.babel, app.db and app.User properties.
  • v0.4.7 Added ‘confirm_email’, ‘password_changed’ and ‘username_changed’ emails.
v0.4.7 API changes
The 'registered' email was split into 'confirm_email' and 'registered' emails.
If you've customized 'templates/flask_user/email/registered_*':
rename the 'registered_*' files into 'confirm_email_*'.
  • v0.4.6 Added ‘next’ query parameter to confirm_email link
  • v0.4.5 Save custom Register fields to User or UserProfile
v0.4.5 API changes
db_adapter.add_object()/update_object()/delete_object() now require a separate
call to db_adapter.commit()
  • v0.4.4 Enhancements and Fixes: Github issues #6, #7 & #8
  • v0.4.3 base.html, flask_user/public_base.html, flask_user/member_base.html. Cleanup. Reduced package size from 83KB to 30KB.
v0.4.3 API changes
Form templates now inherit from templates/flask_user/public_base.html,
templates/flask_user/member_base.html and templates/base.html.
  • v0.4.2 Cleanup of SQLAlchemyAdapter. Added tox for Python 3.4
  • v0.4.1 Cleanup of customized email messages and signals.
v0.4.1 API changes
- User.email_confirmed_at                          --> confirmed_at
- templates/flask_user/emails/confirmation_email_* --> registered_*
- signals.confirmation_email_set                   --> user_registered
- template variable {{ confirmation_link }}        --> {{ confirm_email_link }}
- templates/flask_user/emails/reset_password_*     --> forgot_password_*
- signals.reset_password_email_sent                --> user_forgot_password
  • v0.4.0 Beta release. Translations via Babel.
  • v0.3.8 Role-based authorization via @roles_required.
  • v0.3.5 Support for Python 2.6, 2.7 and 3.3, Event notifications.
  • v0.3.1 Alpha release. Email sending, Confirm email, Forgot password, Reset password.
  • v0.2 Change username, Change password.
  • v0.1 Register, Login, Logout.

Extension Packages

We plan to offer the following Flask-User extensions in the future:

  • Flask-User-Profiles: View profile, Edit profile, Upload profile picture
  • Flask-User-Social: Login via Google, Facebook and Twitter authentication

Acknowledgements

This project would not be possible without the use of the following amazing offerings:

Alternative Flask extensions