fasthtml / nbs
llms.txt7.1k starsChanged 2 years agoApache-2.0View on GitHub
FastHTML is a python library which brings together Starlette, Uvicorn, HTMX, and fastcore's FT "FastTags" into a library for creating server-rendered hypermedia applications. The FastHTML class itself inherits from Starlette, and adds decorator-based routing with many additions, Beforeware, automatic FT to HTML rendering, and much more. Things to remember when writing FastHTML apps:
We split this llms.txt into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Use serve() for running uvicorn (if __name__ == "__main__" is not needed since it's automatic)
- Very specific: line 11
When a title is needed with a response, use Titled.
≈ “Common” is an estimate: at least 1 in 5 of the 3,225 llms.txt files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
# FastHTML > FastHTML is a python library which brings together Starlette, Uvicorn, HTMX, and fastcore's `FT` "FastTags" into a library for creating server-rendered hypermedia applications. The `FastHTML` class itself inherits from `Starlette`, and adds decorator-based routing with many additions, Beforeware, automatic `FT` to HTML rendering, and much more. Things to remember when writing FastHTML apps: - Although parts of its API are inspired by FastAPI, it is *not* compatible with FastAPI syntax and is not targeted at creating API services - FastHTML includes support for Pico CSS and the fastlite sqlite library, although using both are optional; sqlalchemy can be used directly or via the fastsql library, and any CSS framework can be used. Support for the Surreal and css-scope-inline libraries are also included, but both are optional - FastHTML is compatible with JS-native web components and any vanilla JS library, but not with React, Vue, or Svelte - Use `serve()` for running uvicorn (`if __name__ == "__main__"` is not needed since it's automatic) - When a title is needed with a response, use `Titled`; note that that already wraps children in `Container`, and already includes both the meta title as well as the H1 element. ## Docs - [FastHTML concise guide](https://www.fastht.ml/docs/ref/concise_guide.html.md): A brief overview of idiomatic FastHTML apps - [HTMX reference](https://raw.githubusercontent.com/bigskysoftware/htmx/master/www/content/reference.md): Brief description of all HTMX attributes, CSS classes, headers, events, extensions, js lib methods, and config options - [Starlette quick guide](https://gist.githubusercontent.com/jph00/e91192e9bdc1640f5421ce3c904f2efb/raw/61a2774912414029edaf1a55b506f0e283b93c46/starlette-quick.md): A quick overview of some Starlette features useful to FastHTML devs. ## API - [API List](https://www.fastht.ml/docs/apilist.txt): A succint list of all functions and methods in fasthtml. - [MonsterUI API List](https://raw.githubusercontent.com/AnswerDotAI/MonsterUI/refs/heads/main/docs/apilist.txt): Complete API Reference for Monster UI, a component framework similar to shadcn, but for FastHTML ## Examples - [Websockets application](https://raw.githubusercontent.com/AnswerDotAI/fasthtml/main/examples/basic_ws.py): Very brief example of using websockets with HTMX and FastHTML - [Todo list application](https://raw.githubusercontent.com/AnswerDotAI/fasthtml/main/examples/adv_app.py): Detailed walk-thru of a complete CRUD app in FastHTML showing idiomatic use of FastHTML and HTMX patterns. ## Optional - [Surreal](https://raw.githubusercontent.com/AnswerDotAI/surreal/main/README.md): Tiny jQuery alternative for plain Javascript with inline Locality of Behavior, providing `me` and `any` functions - [Starlette full documentation](https://gist.githubusercontent.com/jph00/809e4a4808d4510be0e3dc9565e9cbd3/raw/9b717589ca44cedc8aaf00b2b8cacef922964c0f/starlette-sml.md): A subset of the Starlette documentation useful for FastHTML development. - [JS App Walkthrough](https://www.fastht.ml/docs/tutorials/e2e.html.md): An end-to-end walkthrough of a complete FastHTML app, including deployment to railway. - [FastHTML by Example](https://www.fastht.ml/docs/tutorials/by_example.html.md): A collection of 4 FastHTML apps showcasing idiomatic use of FastHTML and HTMX patterns. - [Using Jupyter to write FastHTML](https://www.fastht.ml/docs/tutorials/jupyter_and_fasthtml.html.md): A guide to developing FastHTML apps inside Jupyter notebooks. - [FT Components](https://www.fastht.ml/docs/explains/explaining_xt_components.html.md): Explanation of the `FT` components, which are a way to write HTML in a Pythonic way. - [FAQ](https://www.fastht.ml/docs/explains/faq.html.md): Answers to common questions about FastHTML. - [MiniDataAPI Spec](https://www.fastht.ml/docs/explains/minidataapi.html.md): Explanation of the MiniDataAPI specification, which allows us to use the same API for many different database engines. - [OAuth](https://www.fastht.ml/docs/explains/oauth.html.md): Tutorial and explanation of how to use OAuth in FastHTML apps. - [Routes](https://www.fastht.ml/docs/explains/routes.html.md): Explanation of how routes work in FastHTML. - [WebSockets](https://www.fastht.ml/docs/explains/websockets.html.md): Explanation of websockets and how they work in FastHTML. - [Custom Components](https://www.fastht.ml/docs/ref/defining_xt_component.md): Explanation of how to create custom components in FastHTML. - [Handling Handlers](https://www.fastht.ml/docs/ref/handlers.html.md): Explanation of how to request and response handlers work in FastHTML as routes. - [Live Reloading](https://www.fastht.ml/docs/ref/live_reload.html.md): Explanation of how to use live reloading for FastHTML development.
Trending
Less talk lately.about the whole repository
Who's talking about AnswerDotAI/fasthtml
- @bearstech.com“FastHTML : un framework web Open Source nouvelle génération pour créer des applications HTML avec Python 👉 …”Bluesky · Aug 29, 2024 · 5 likes
- @bearstech.com“FastHTML : une plateforme Open Source pour créer des applications web modernes entièrement en Python. …”Bluesky · Jul 31, 2024 · 4 likes
- NixOS/nixpkgs“Add python3Packages.apswutils, python3Packages.fastlite, python3Packages.fasthtml”GitHub · Jul 3, 2025 · 3 reactions
- starfederation/datastar“Python SDK: Add a helper for constructing data-* attributes”GitHub · May 20, 2025 · 3 reactions
- Stack Overflow“FastHTML htmx attribute is not translated in final HTML”Stack Overflow · Aug 14, 2024 · 3 votes
The biggest 5 of 53 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 53
Talked about on GitHub, Bluesky and Stack Overflow (53 times).
On GitHub · 50
- Jul 3, 2025Add python3Packages.apswutils, python3Packages.fastlite, python3Packages.fasthtml — NixOS/nixpkgs3 reactions · 1 comment
- May 20, 2025Python SDK: Add a helper for constructing data-* attributes — starfederation/datastar3 reactions · 33 comments
- Oct 1, 2024add an "/llms-ctx.txt" for easy peasy ell LLM context — MadcowD/ell2 reactions · 1 comment
- Aug 10, 2026Website sidebar section glob matching no inputs crashes pre-render in findIndexFile — quarto-dev/quarto-cli1 reaction · 5 comments
- Sep 30, 2025BUG: GitIngest fails to read UTF-8 files on Windows with cp1252 encoding error — DAESA24/gitingest-agent-project1 reaction
45 more on GitHub
- Oct 27, 2026build(deps): bump python-fasthtml from 0.14.13 to 0.14.14 — Akkudoktor-EOS/EOS0 reactions · 2 comments
- Oct 26, 2026chore(deps): bump the python-deps group with 3 updates — codetalcott/mojo-http0 reactions · 1 comment
- Oct 14, 2026chore(deps): bump python-fasthtml from 0.14.3 to 0.14.13 — Nithanth/office-hours0 reactions
- Oct 8, 2026chore(deps): bump the python-minor-patch group across 1 directory with 14 updates — ernestodota2011/aethercal0 reactions · 1 comment
- Sep 24, 2026chore(deps): bump the python-minor-patch group across 1 directory with 12 updates — ernestodota2011/aethercal0 reactions · 1 comment
- Sep 24, 2026python-fasthtml 0.14.13 — AnacondaRecipes/python-fasthtml-feedstock0 reactions · 1 comment
- Sep 17, 2026chore(deps): bump the python-minor-patch group with 11 updates — ernestodota2011/aethercal0 reactions · 1 comment
- Sep 9, 2026Bump python-fasthtml from 0.14.04 to 0.14.13 — s66erge/entan-mkdocs0 reactions · 1 comment
- Sep 8, 2026build(deps): bump python-fasthtml from 0.14.12 to 0.14.13 — Akkudoktor-EOS/EOS0 reactions · 1 comment
- Sep 7, 2026chore(deps): bump python-fasthtml from 0.14.12 to 0.14.13 in the python-deps group across 1 directory — codetalcott/mojo-http0 reactions · 1 comment
- Aug 26, 2026Bump python-fasthtml from 0.14.04 to 0.14.12 — s66erge/entan-mkdocs0 reactions · 1 comment
- Aug 25, 2026build(deps): bump python-fasthtml from 0.14.11 to 0.14.12 — Akkudoktor-EOS/EOS0 reactions · 1 comment
- Aug 20, 2026chore(deps): bump the python-minor-patch group across 1 directory with 12 updates — ernestodota2011/aethercal0 reactions · 1 comment
- Aug 11, 2026build(deps): bump python-fasthtml from 0.14.9 to 0.14.11 — Akkudoktor-EOS/EOS0 reactions · 1 comment
- Aug 5, 2026Bump python-fasthtml from 0.14.04 to 0.14.11 — s66erge/entan-mkdocs0 reactions · 1 comment
- Jul 29, 2026Bump python-fasthtml from 0.14.04 to 0.14.9 — s66erge/entan-mkdocs0 reactions · 1 comment
- Jul 23, 2026chore(deps): bump the python-minor-patch group across 1 directory with 5 updates — ernestodota2011/aethercal0 reactions · 1 comment
- Jul 20, 2026build(deps): bump python-fasthtml from 0.14.6 to 0.14.9 — Akkudoktor-EOS/EOS0 reactions
- Jul 17, 2026chore(deps): bump the python-minor-patch group across 1 directory with 5 updates — ernestodota2011/aethercal0 reactions · 1 comment
- Jul 16, 2026chore(deps): bump the python-minor-patch group with 6 updates — ernestodota2011/aethercal0 reactions · 1 comment
- Jul 15, 2026build(deps): bump python-fasthtml from 0.14.5 to 0.14.6 — Akkudoktor-EOS/EOS0 reactions
- Jul 13, 2026Bump python-fasthtml from 0.6.9 to 0.14.6 — Qentora/quoptuna0 reactions
- Jul 9, 2026build(deps): bump python-fasthtml from 0.14.4 to 0.14.5 — Akkudoktor-EOS/EOS0 reactions
- Jun 29, 2026build(deps): bump python-fasthtml from 0.14.3 to 0.14.4 — Akkudoktor-EOS/EOS0 reactions
- Jun 26, 2026Add CSS scoping build process and update project version — anyblades/pico-is-now-blades0 reactions
- Jun 26, 2026ship `pico.conditional.css` — anyblades/blades0 reactions · 1 comment
- Jun 26, 2026build(deps-dev): update python-fasthtml requirement from <0.13.0,>=0.12.0 to >=0.12.0,<0.15.0 — orq-ai/evaluatorq0 reactions
- Jun 21, 2026build(deps): bump python-fasthtml from 0.14.2 to 0.14.3 — Akkudoktor-EOS/EOS0 reactions
- Jun 21, 2026python3Packages.fasthtml: 0.12.48 -> 0.13.3 — NixOS/nixpkgs0 reactions · 1 comment
- Jun 15, 2026Bump python-fasthtml from 0.6.9 to 0.14.2 — Qentora/quoptuna0 reactions · 1 comment
- May 29, 2026build(deps): bump python-fasthtml from 0.14.1 to 0.14.2 — Akkudoktor-EOS/EOS0 reactions
- May 10, 2026build(deps): bump python-fasthtml from 0.13.4 to 0.14.1 — Akkudoktor-EOS/EOS0 reactions
- Apr 24, 2026build(deps): bump python-fasthtml from 0.13.3 to 0.13.4 — Akkudoktor-EOS/EOS0 reactions
- Apr 18, 2026build(deps): bump python-fasthtml from 0.13.2 to 0.13.3 — Akkudoktor-EOS/EOS0 reactions
- Apr 13, 2026chore(deps): update python-fasthtml requirement from >=0.12.42 to >=0.13.3 — navneeth/viralvibes0 reactions · 3 comments
- Mar 28, 2026build(deps): bump python-fasthtml from 0.13.1 to 0.13.2 — Akkudoktor-EOS/EOS0 reactions
- Mar 25, 2026Bump python-fasthtml from 0.12.47 to 0.13.1 — slangenbach/poor-mans-ui0 reactions
- Mar 23, 2026build(deps): bump python-fasthtml from 0.12.50 to 0.13.0 — Akkudoktor-EOS/EOS0 reactions
- Mar 20, 2026python3Packages.fasthtml: 0.12.48 -> 0.12.50 — NixOS/nixpkgs0 reactions · 1 comment
- Mar 18, 2026Bump python-fasthtml from 0.12.47 to 0.12.50 — slangenbach/poor-mans-ui0 reactions · 1 comment
- Mar 5, 2026build(deps): bump python-fasthtml from 0.12.47 to 0.12.48 — tammof/eos-fix0 reactions
- Feb 27, 2026[BUG]: `unpinned-uses` audit crashes on YAML flow sequence steps — zizmorcore/zizmor0 reactions · 2 comments
- Jan 23, 2026Bump the python-packages group across 1 directory with 22 updates — traoreera/core0 reactions
- Oct 20, 2025Latest version of apsw==3.50.4.0 core dumps FastHTML on MacOS — rogerbinns/apsw0 reactions · 8 comments
- Sep 30, 2025BUG: Windows console encoding error - CLI commands fail with Unicode characters — DAESA24/gitingest-agent-project0 reactions
On Bluesky · 2
- Aug 29, 2024FastHTML : un framework web Open Source nouvelle génération pour créer des applications HTML avec Python 👉 En savoir plus :… — @bearstech.com5 likes and reposts
- Jul 31, 2024FastHTML : une plateforme Open Source pour créer des applications web modernes entièrement en Python. github.com/AnswerDot... — @bearstech.com4 likes and reposts
On Stack Overflow · 1
- Aug 14, 2024FastHTML htmx attribute is not translated in final HTML3 votes
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

