Flask-BasicAuth
HTTP basic access authentication for Flask.
What it is and what it does
Flask-BasicAuth is a Flask extension that wraps HTTP basic access authentication—the simple username-and-password mechanism built into the HTTP protocol—so you can protect Flask views with a decorator. It lets you configure credentials via Flask config and mark routes as requiring authentication.
The package has no runtime dependencies beyond Flask itself and is straightforward to set up. However, it has been abandoned since June 2013 and has not received updates or maintenance for over a decade. The codebase targets Python 2.6, 2.7, and 3.3, and there is no evidence it has been tested against modern Python versions or recent Flask releases. For new projects, this poses significant risk: you are adopting a library that will not receive bug fixes, security patches, or compatibility updates.
Use it for:
- Protecting internal admin dashboards or development tools with simple HTTP basic auth when no complex user management is needed.
- Adding quick authentication to Flask prototypes or proof-of-concept applications during early development.
- Securing API endpoints in legacy Flask applications that already depend on this package and cannot easily migrate.
- Protecting static documentation or internal services where basic credentials are acceptable.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Flask-BasicAuth adds HTTP basic access authentication to Flask applications, letting you protect views or entire applications with username and password credentials.
No. The package is abandoned (last release June 2013, last commit February 2021) and has not been tested against modern Python or Flask versions. For new projects, use a maintained authentication library. For existing projects already using it, plan a migration to an actively maintained alternative.
Install
flask-basicauth on PyPI
pip
pip install flask-basicauthuv
uv add flask-basicauthpoetry
poetry add flask-basicauthInstalling Flask-BasicAuth
Before you install
High install friction and abandoned maintenance status (last commit February 2021, no releases since June 2013) make this a risky choice for new projects. The package has not been updated in over a decade and receives no active support.
License in practice
BSD license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
pip install Flask-BasicAuth
from flask import Flask
from flask_basicauth import BasicAuth
app = Flask(__name__)
app.config['BASIC_AUTH_USERNAME'] = 'user'
app.config['BASIC_AUTH_PASSWORD'] = 'pass'
basic_auth = BasicAuth(app)
@app.route('/')
@basic_auth.login_required
def index():
return 'Protected content'
Requires Flask to be installed; package targets Python 2.6, 2.7, and 3.3 but has not been tested against modern Python versions.
Verify before relying
- Whether the package works reliably with current Flask versions and modern Python versions.
- Security implications of using an unmaintained authentication library without ongoing audits.
- Whether there are known incompatibilities or breaking changes in newer Flask releases.
- HTTP status code behavior for unauthenticated requests.
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 4,808 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 429,996/month — #6,734 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: Flask-BasicAuth-0.2.0.tar.gz
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
aiohttp-basicauthProvides HTTP basic authentication middleware…
permissive · top 15,000 on PyPI
Flask-HTTPAuthAdds HTTP Basic, Digest, and Token…
permissive · top 5,000 on PyPI
Flask-ParanoidFlask-Paranoid detects and blocks session…
permissive · top 15,000 on PyPI
Flask-LoginFlask-Login handles user session management for…
permissive · top 1,000 on PyPI
Flask-PrincipalFlask-Principal provides identity and…
permissive · top 15,000 on PyPI
Flask-JWT-ExtendedAdds JSON Web Token (JWT) authentication to…
permissive · top 5,000 on PyPI
flask-talismanFlask extension that automatically sets HTTP…
permissive · top 5,000 on PyPI
Flask-WTFFlask-WTF integrates WTForms with Flask to…
permissive · top 5,000 on PyPI
python-casImplements a CAS (Central Authentication…
permissive · top 15,000 on PyPI
sanic-jwtSanic JWT adds JWT-based authentication and…
permissive · top 15,000 on PyPI