skillfed

python-fasthtml

The fastest way to create an HTML app

python-fasthtml v0.14.11 1.1M downloads/30d#4,360 on PyPI7,006
Permissive license Apache-2.0 Active released

What it is and what it does

FastHTML is a Python web framework designed to simplify building interactive web applications by using HTML-over-the-wire with HTMX instead of traditional JavaScript frontends. It maps Python functions directly to HTTP routes and HTML elements, letting you write full-stack applications in pure Python. The framework uses starlette and uvicorn under the hood and integrates with beautifulsoup4 for HTML manipulation and httpx2 for HTTP requests.

The core idea is that your Python functions return HTML fragments, and HTMX handles swapping them into the page on the client side—eliminating the need to write JavaScript or manage a separate frontend. It ships with fastcore for functional utilities and includes support for authentication (via oauthlib), file uploads (python-multipart), and date handling (python-dateutil). The framework is still in Alpha, so the API may change, but it has active development and a growing community.

Use it for:

  • Build interactive web dashboards and admin panels without writing JavaScript or managing a frontend build process.
  • Create real-time collaborative applications where server-side HTML generation and HTMX swaps keep the UI in sync.
  • Prototype web applications quickly using Python's full ecosystem while keeping code minimal and readable.
  • Add interactivity to existing HTML pages by serving partial HTML fragments in response to user actions.
  • Build form-heavy applications where server-side validation and rendering logic can be expressed in pure Python.

Worth the install?

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

FastHTML is a Python web framework that builds interactive web applications using HTML-over-the-wire with HTMX, allowing you to write full-stack web apps in Python without writing JavaScript.

Yes, if you want to build interactive web apps in pure Python and are comfortable with Alpha-stage software. The low install friction, active maintenance, permissive license, and strong community signal make it a solid choice for prototyping or production use in teams that prefer Python over JavaScript. Not recommended if you need a stable, battle-tested framework or require a large ecosystem of third-party integrations.

Install

python-fasthtml on PyPI

pip

pip install python-fasthtml

uv

uv add python-fasthtml

poetry

poetry add python-fasthtml

Installing python-fasthtml

Before you install

Low install friction with a pure-Python wheel and nine runtime dependencies. The project is actively maintained with a recent release (14 days ago) and strong community engagement (7006 GitHub stars), though it remains in Alpha status, so expect API changes.

License in practice

Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions—suitable for most projects.

Quickstart

pip install python-fasthtml

from fasthtml.common import *

app, rt = fast_app()

@rt('/')
def get():
    return Div(P('Hello World!'))

serve()

Requires Python 3.10 or later.

Verify before relying

  • Whether the nine runtime dependencies (including uvicorn, starlette, httpx2) are all required for minimal apps or if some are optional.
  • Performance characteristics and scalability limits compared to other Python web frameworks.
  • Maturity of the HTMX integration and stability of the API given the Alpha status.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 9 — fastcore, python-dateutil, starlette, oauthlib, itsdangerous, uvicorn, httpx2, python-multipart, beautifulsoup4
Maintenance actively maintained — 14 days since the last release
Last repo commit
First released
Downloads 1,108,486/month — #4,360 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: python_fasthtml-0.14.11-py3-none-any.whl

Keywords: nbdev, jupyter, notebook, python

Development Status :: 3 - AlphaIntended Audience :: DevelopersNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: Only

Tags

python web framework htmxhtml over the wire pythoninteractive web apps pythonminimal python web frameworkserver-side html renderinghtmx python frameworkno javascript web framework
web-frameworkhtmxhtml-over-wire

More Application Frameworks packages