litestar-htmx
HTMX Integration for Litestar
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-htmxuv
uv add litestar-htmxpoetry
poetry add litestar-htmxInstalling 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
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
django-htmxProvides Django integration utilities for htmx,…
permissive · top 5,000 on PyPI
litestarLitestar is an ASGI framework for building REST…
permissive · top 5,000 on PyPI
python-fasthtmlFastHTML is a Python web framework that builds…
permissive · top 5,000 on PyPI
jinja2-fragmentsRenders individual Jinja2 template blocks as…
permissive · top 15,000 on PyPI
sphinxcontrib-jsmathA Sphinx extension that renders mathematical…
permissive · top 1,000 on PyPI
Flask-AssetsIntegrates asset management into Flask…
permissive · top 15,000 on PyPI
advanced-alchemyAdvanced Alchemy provides sync and async…
permissive · top 15,000 on PyPI
django-leafletIntegrates the Leaflet JavaScript mapping…
copyleft · top 15,000 on PyPI
httpx-wsAdds WebSocket support to HTTPX, enabling sync…
permissive · top 5,000 on PyPI
jinja_partialsAdds a `render_partial()` function to Jinja2…
permissive · top 5,000 on PyPI