skillfed

Flask-BasicAuth

HTTP basic access authentication for Flask.

flask-basicauth v0.2.0 430.0K downloads/30d#6,734 on PyPI85
Permissive license BSD Abandoned released

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-basicauth

uv

uv add flask-basicauth

poetry

poetry add flask-basicauth

Installing 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

Environment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3.3Programming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Software Development :: Libraries :: Python Modules

Tags

flask basic authhttp basic authenticationflask view protectionbasic access auth flaskflask password protectionhttp credentials flaskflask authentication decorator
authenticationdeprecatedlegacy

More Python Modules packages