skillfed

litestar-htmx

HTMX Integration for Litestar

litestar-htmx v0.5.0 1.9M downloads/30d#3,468 on PyPI
Permissive license MIT AGING released

What it is and what it does

litestar-htmx is a plugin that bridges HTMX and Litestar, a modern Python web framework. It provides server-side tooling to handle HTMX requests and responses, allowing you to build interactive web interfaces by returning HTML fragments from your server rather than building a separate JavaScript frontend. The plugin handles the mechanics of recognizing HTMX requests, managing response headers, and integrating with Litestar's request/response cycle.

The package has no runtime dependencies and supports Python 3.9 through 3.12. It is permissively licensed under MIT. However, the last release was 429 days ago, so the project is in aging maintenance status—you should verify compatibility with your target Litestar version before adopting it.

Use it for:

  • Build interactive web pages that update sections of the DOM without full page reloads, driven from server-side handlers.
  • Add HTMX-powered form validation and submission that returns HTML fragments instead of JSON.
  • Create dynamic table filtering, sorting, or pagination where the server renders updated HTML in response to user interactions.
  • Integrate HTMX into an existing Litestar application to add interactivity without writing frontend JavaScript.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Integrates HTMX into Litestar web applications, enabling server-driven dynamic HTML interactions without writing JavaScript.

Yes, if you are already using Litestar and want HTMX support with minimal setup and no extra dependencies. The permissive MIT license and low install friction make it a straightforward addition. However, the aging maintenance status means you should verify compatibility with your Litestar version and be prepared to maintain a fork if upstream support lags.

Install

litestar-htmx on PyPI

pip

pip install litestar-htmx

uv

uv add litestar-htmx

poetry

poetry add litestar-htmx

Installing litestar-htmx

Before you install

Low install friction with no runtime dependencies. Maintenance status is aging—last release was 429 days ago—so expect slower response to issues or breaking changes.

License in practice

MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.

Quickstart

pip install litestar-htmx

from litestar import Litestar
from litestar_htmx import HTMXPlugin

app = Litestar(plugins=[HTMXPlugin()])

Verify before relying

  • Whether the package remains compatible with recent versions given the aging maintenance status.
  • What specific HTMX features or patterns the plugin supports beyond basic integration.
  • Whether documentation at docs.litestar.dev/latest/usage/htmx.html remains current and complete.

Package facts

License MIT (permissive)
Python support supports the current Python release (<4.0,>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance aging — 429 days since the last release
First released
Downloads 1,878,246/month — #3,468 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: litestar_htmx-0.5.0-py3-none-any.whl

License :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: InternetTopic :: Internet :: WWW/HTTPTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Application FrameworksTopic :: Software Development :: Libraries :: Python Modules

Tags

htmx litestar integrationserver-driven html updateshtmx web framework plugindynamic html without javascriptlitestar htmx support
htmxweb-framework-plugin

More Software Development packages