Flask-Bcrypt
Brcrypt hashing for Flask.
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-bcryptuv
uv add flask-bcryptpoetry
poetry add flask-bcryptInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
bcryptbcrypt provides modern password hashing using…
permissive · top 1,000 on PyPI
pwdlibProvides a modern, easy-to-use wrapper for…
permissive · top 5,000 on PyPI
AuthEncodingAuthEncoding provides a framework for creating,…
unclear · top 15,000 on PyPI
passlibPasslib provides a framework for hashing and…
permissive · top 1,000 on PyPI
Flask-HTTPAuthAdds HTTP Basic, Digest, and Token…
permissive · top 5,000 on PyPI
Flask-LoginFlask-Login handles user session management for…
permissive · top 1,000 on PyPI
argon2-cffiProvides a simple Python interface to Argon2, a…
permissive · top 1,000 on PyPI
siphashProvides a Python implementation of SipHash, a…
permissive · top 15,000 on PyPI
scryptPython bindings for the scrypt key derivation…
permissive · top 15,000 on PyPI