skillfed

quart-auth

A Quart extension to provide secure cookie authentication

quart-auth v0.11.0 103.5K downloads/30d#12,804 on PyPI
Permissive license MIT DORMANT released

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

uv

uv add quart-auth

poetry

poetry add quart-auth

Installing 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

Development Status :: 3 - AlphaEnvironment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Software Development :: Libraries :: Python Modules

Tags

quart session authenticationsecure cookie management pythonquart login decoratorasync web app user authenticationquart user session managementprotected routes quartquart auth middleware
async-websession-managementauthentication

More Python Modules packages