Single-file first workflow
Build apps in a single Python file to start small, then split into multiple files only when that helps maintenance or scale.
FastHTML is a Python web framework for modern web apps, prototypes, dashboards, internal tools, and scalable apps that run on any Python-hosting service.
FastHTML is a Python web framework for building modern web applications directly from Python code. It is positioned as a general-purpose full-stack system that aims to stay simple for small prototypes while remaining usable for larger, scalable applications.
The site describes FastHTML as built on web foundations such as ASGI, HTMX, HTTP, HTML, CSS, and JavaScript. It is designed for apps that can start in a single Python file, use reusable components and partial page updates, and deploy anywhere Python runs.
Build apps in a single Python file to start small, then split into multiple files only when that helps maintenance or scale.
Work directly with HTTP, HTML, CSS, and JavaScript instead of hiding the web stack behind heavier abstractions.
Return lightweight HTML partials that update the DOM directly, supporting interactive apps without full page refreshes.
Use Python objects and components that render directly into HTML, including reusable UI components and dynamic content.
Install and use UI libraries such as Bootstrap, DaisyUI, Shoelace, and Flowbite from Python, plus additional Python or JavaScript libraries when needed.
Use built-in support for function-level and handler-level caching, async, threading, and other app-building utilities.
Build internal dashboards or operational tools where the team wants Python on both the server side and the UI layer.
Prototype a web product quickly in a single Python file, then expand it into a larger application if the idea proves useful.
Create interactive reports or analytics views that need live updates and lightweight DOM changes instead of full page reloads.
Ship content-heavy sites such as blogs that still need selective interaction or dynamic components.
Assemble small collaborative or multimodal app experiences, such as the example games and chat-style samples shown on the site.
FastHTML is designed for general-purpose web applications built in Python, including dashboards, prototypes, internal tools, interactive reports, blogs with dynamic content, and modern SPA-style apps.
FastHTML can run on any service or server that supports Python. The site mentions guides or helpers for Railway, Vercel, Hugging Face Spaces, Replit, and PythonAnywhere, and also says it works on VPS, on-premise machines, and major operating systems.
FastHTML is designed for building HTML applications rather than APIs. The site says FastAPI is one of its inspirations, but FastHTML is aimed at creating hypermedia applications, while FastAPI is designed for creating APIs.
No. The site says you can write nearly any standard web app with just Python, while still being able to add JavaScript when it is useful or incorporate existing JS libraries.
Pricing is not published on the site. The pricing page at fastht.ml/pricing returns a 404 Not Found in the provided source.