skillfed

Flask-Bcrypt

Brcrypt hashing for Flask.

flask-bcrypt v1.0.1 2.3M downloads/30d#3,140 on PyPI327
Permissive license BSD Active released

What it is and what it does

Flask-Bcrypt is a Flask extension that integrates the bcrypt password-hashing algorithm into your application. Bcrypt is intentionally designed to be computationally slow, making it resistant to brute-force attacks even as hardware becomes faster—a significant advantage over older algorithms like MD5 or SHA1 that prioritize speed. The extension exposes two main methods: one to hash a password and one to verify a plaintext password against a stored hash.

You initialize it by passing your Flask app object to the Bcrypt class, then call its hashing and verification methods from anywhere in your application. It's a thin, focused wrapper around the bcrypt library, suitable for any Flask application that needs to store and validate user passwords securely.

Use it for:

  • Hash user passwords during registration or password-change workflows in a Flask web application
  • Verify user-supplied passwords during login against stored bcrypt hashes
  • Protect sensitive authentication data in multi-user web applications where password compromise is a security risk
  • Replace weak or fast hashing algorithms in legacy Flask applications with a modern, attack-resistant alternative

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Flask-Bcrypt wraps the bcrypt password-hashing library for use in Flask applications, providing secure password hashing and verification methods designed to resist brute-force attacks.

Yes. Flask-Bcrypt is a mature, actively maintained extension with no known vulnerabilities, low install friction, and a permissive license. It solves a critical security problem—password hashing—with a proven algorithm. Install it if you are building a Flask application that requires user authentication.

Install

flask-bcrypt on PyPI

pip

pip install flask-bcrypt

uv

uv add flask-bcrypt

poetry

poetry add flask-bcrypt

Installing Flask-Bcrypt

Before you install

Installation is straightforward with low friction—a pure Python wheel with only two runtime dependencies (Flask and bcrypt). The package maintains active status with recent commits, though the latest release dates to 2022-04-05.

License in practice

BSD license is permissive, allowing use in commercial and proprietary projects with minimal restrictions beyond attribution.

Quickstart

pip install flask-bcrypt

from flask import Flask
from flask_bcrypt import Bcrypt

app = Flask(__name__)
bcrypt = Bcrypt(app)

pw_hash = bcrypt.generate_password_hash('hunter2')
bcrypt.check_password_hash(pw_hash, 'hunter2')  # returns True

Verify before relying

  • Whether the 2022-04-05 release date reflects active maintenance or if the package is in maintenance-only mode
  • Python version support beyond 3.7, 3.8, 3.9 listed in classifiers

Package facts

License BSD (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 2 — Flask, bcrypt
Maintenance actively maintained — 1,592 days since the last release
Last repo commit
First released
Downloads 2,323,862/month — #3,140 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: Flask_Bcrypt-1.0.1-py3-none-any.whl

Environment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Software Development :: Libraries :: Python Modules

Tags

flask password hashingbcrypt flask extensionsecure password storage flaskpassword verification flaskflask authentication hashingbcrypt integration flaskpassword security flask
password-hashingflask-extensionauthentication

More Python Modules packages