quart-auth
A Quart extension to provide secure cookie authentication
What it is and what it does
Quart-Auth is a session management extension for the Quart async web framework that handles user authentication via secure cookies. It provides decorators and utility functions to protect routes, log users in and out, and access the current user's authentication state throughout your application.
The package integrates directly with Quart's initialization pattern and works with async route handlers. It stores session data in signed cookies, requiring only a secret key to be configured. You decorate routes with @login_required to enforce authentication, catch Unauthorized exceptions to redirect unauthenticated users, and use login_user() and logout_user() functions to manage sessions programmatically.
Use it for:
- Protect admin or user-only routes in a Quart web application by decorating them with @login_required.
- Build a login form that calls login_user(AuthUser(id)) after credential verification to start a session.
- Display user-specific content in templates by accessing the current_user global variable.
- Implement a logout endpoint that calls logout_user() to end the current session.
- Redirect unauthenticated users to a login page by catching the Unauthorized exception.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Quart-Auth provides session-based authentication for Quart web applications through secure cookie management, allowing you to protect routes, log users in and out, and track authentication state.
Yes, if you are building a Quart application and need straightforward session-based authentication. The low install friction, permissive license, and support for current Python versions make it a reasonable choice. However, the 596-day gap since the last release signals dormancy; verify that the package meets your security and maintenance expectations before adopting it in a new project.
Install
quart-auth on PyPI
pip
pip install quart-authuv
uv add quart-authpoetry
poetry add quart-authInstalling quart-auth
Before you install
Low install friction with only two runtime dependencies (quart and typing_extensions). The package is dormant—no release in 596 days—which may indicate limited active maintenance, though it does support current Python versions (3.9–3.13).
License in practice
MIT license is permissive, allowing commercial and private use with minimal restrictions; you may use this package freely in most projects.
Quickstart
pip install quart-auth
from quart import Quart
from quart_auth import QuartAuth, login_required
app = Quart(__name__)
app.secret_key = "your-secret-key"
QuartAuth(app)
@app.route("/protected")
@login_required
async def protected():
return "Authenticated"
if __name__ == "__main__":
app.run()
Requires Quart to be installed and configured; you must set a secret key on the app before initializing QuartAuth.
Verify before relying
- Whether the 596-day gap since last release indicates active maintenance or planned stability.
- Security audit status and whether the package has undergone formal security review.
- Real-world production usage patterns and any known limitations in session handling.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — quart, typing_extensions |
| Maintenance | dormant — 596 days since the last release |
| First released | |
| Downloads | 103,452/month — #12,804 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: quart_auth-0.11.0-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
quart-corsQuart-CORS adds Cross-Origin Resource Sharing…
permissive · top 15,000 on PyPI
Flask-LoginFlask-Login handles user session management for…
permissive · top 1,000 on PyPI
Flask-HTTPAuthAdds HTTP Basic, Digest, and Token…
permissive · top 5,000 on PyPI
QuartQuart is an async Python web framework that…
permissive · top 5,000 on PyPI
dj-rest-authProvides drop-in REST API endpoints for user…
permissive · top 5,000 on PyPI
quart-schemaQuart-Schema adds schema validation and…
permissive · top 15,000 on PyPI
streamlit-authenticatorAdds user authentication and access control to…
permissive · top 15,000 on PyPI
macaroonbakeryMacaroonbakery provides HTTP authentication and…
copyleft · top 5,000 on PyPI
fastapi-sessionsAdds session authentication to FastAPI…
permissive · top 15,000 on PyPI
django-user-sessionsReplaces Django's opaque session backend with…
permissive · top 15,000 on PyPI