aiohttp-basicauth
Proxy connector for aiohttp
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, installs with low friction, and solves a straightforward problem for aiohttp users. Use it when you need basic HTTP authentication without the complexity of OAuth or session management.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires aiohttp >= 3.10 and Python >= 3.8
- Low friction installation with a single dependency on aiohttp.
- Actively maintained with recent releases and a stable codebase.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 is permissive; you can use this package freely in commercial and open-source projects with minimal restrictions.
last release 2026-06-05 (70 days) · last repo commit 2026-06-05 · 18 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 78,062 downloads/mo, #14,471 on PyPI
Alternatives
Verify before relying
pip install aiohttp-basicauth
from aiohttp import web
from aiohttp_basicauth import BasicAuthMiddleware
auth = BasicAuthMiddleware(username='user', password='password')
app = web.Application(middlewares=[auth])
web.run_app(app, host='127.0.0.1', port=80)- Whether the package supports custom credential backends (e.g., database lookups) beyond the check_credentials override pattern shown in the description
- What HTTP status code is returned when authentication fails
What it is and what it does
aiohttp-basicauth is a middleware for aiohttp that adds HTTP basic authentication to your async web application. It intercepts requests and validates credentials against a username and password you provide, returning an error response if authentication fails. You can apply it globally to all routes or selectively to specific views using a decorator.
The package is lightweight and depends only on aiohttp. It supports both simple static credentials and custom verification logic by subclassing and overriding the check_credentials method, making it suitable for scenarios ranging from development servers to applications with dynamic user stores.
Use it for
- Protect all routes in a development or internal API with a single username and password
- Selectively require authentication on specific endpoints while leaving others public
- Implement custom authentication logic by subclassing and querying a database for user credentials
- Add basic auth to microservices or internal tools that need simple credential validation
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, installs with low friction, and solves a straightforward problem for aiohttp users. Use it when you need basic HTTP authentication without the complexity of OAuth or session management.
Install
aiohttp-basicauth on PyPI
Before you install
Low friction installation with a single dependency on aiohttp. Actively maintained with recent releases and a stable codebase.
Requires aiohttp >= 3.10 and Python >= 3.8
License in practice
Apache-2.0 is permissive; you can use this package freely in commercial and open-source projects with minimal restrictions.
Quickstart
pip install aiohttp-basicauth
from aiohttp import web
from aiohttp_basicauth import BasicAuthMiddleware
auth = BasicAuthMiddleware(username='user', password='password')
app = web.Application(middlewares=[auth])
web.run_app(app, host='127.0.0.1', port=80)
Verify before relying
- Whether the package supports custom credential backends (e.g., database lookups) beyond the check_credentials override pattern shown in the description
- What HTTP status code is returned when authentication fails
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.8.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageaiohttp |
| Maintenance | Actively maintained 70 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 78,062 / month, #14,471 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaFramework :: AsyncIOIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOSOperating System :: MicrosoftOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTP |
Evidence: aiohttp_basicauth-1.2.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “aiohttp basic auth middleware”
- aiohttp-basicauthProvides HTTP basic authentication middleware for aiohttp…
- Flask-HTTPAuthAdds HTTP Basic, Digest, and Token authentication decorators to Flask…
- www-authenticateParses WWW-Authenticate HTTP headers into structured challenge data,…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also aiohttp-middlewares · Flask-BasicAuth · Flask-HTTPAuth · aiohttp_socks · aiohttp-session · aiohttp-cors · Flask-Cognito · pytest-aiohttp