Skip to main content

Tests Version Supported Python Versions

Flask-Bcrypt

Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application.

Due to the recent increased prevalence of powerful hardware, such as modern GPUs, hashes have become increasingly easy to crack. A proactive solution to this is to use a hash that was designed to be "de-optimized". Bcrypt is such a hashing facility; unlike hashing algorithms such as MD5 and SHA1, which are optimized for speed, bcrypt is intentionally structured to be slow.

For sensitive data that must be protected, such as passwords, bcrypt is an advisable choice.

Installation

Install the extension with one of the following commands:

$ easy_install flask-bcrypt

or alternatively if you have pip installed:

$ pip install flask-bcrypt

Usage

To use the extension simply import the class wrapper and pass the Flask app object back to here. Do so like this:

from flask import Flask
from flask_bcrypt import Bcrypt

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

Two primary hashing methods are now exposed by way of the bcrypt object. Use them like so:

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

Documentation

The Sphinx-compiled documentation is available here: https://flask-bcrypt.readthedocs.io/

Release files for Flask-Bcrypt 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Flask-Bcrypt 1.0.1
File Size Uploaded
Flask-Bcrypt-1.0.1.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Flask-Bcrypt 1.0.1
File Interpreter ABI Platform
Flask_Bcrypt-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.0 kB

Release files / Flask-Bcrypt-1.0.1.tar.gz

Download URL Flask-Bcrypt-1.0.1.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f07b66b811417ea64eb188ae6455b0b708a793d966e1a80ceec4a23bc42a4369
BLAKE2b-256 checksum
How to use checksums
0cf425dccfafad391d305b63eb6031e7c1dbb757169d54d3a73292939201698e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.13

Release files / Flask_Bcrypt-1.0.1-py3-none-any.whl

Download URL Flask_Bcrypt-1.0.1-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
062fd991dc9118d05ac0583675507b9fe4670e44416c97e0e6819d03d01f808a
BLAKE2b-256 checksum
How to use checksums
8b72af9a3a3dbcf7463223c089984b8dd4f1547593819e24d57d9dc5873e04fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.13

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.7.1

1 release file

0.7.0

1 release file

0.6.2

1 release file

0.6.1

0.6.0

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5

1 release file

0.4

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page