TGViewer
Реальный Python Реальный Python @python_real · 3.64K subscribers
Post #828 952
FastHX

FastAPI and HTMX, the right way.

Key features:
Decorator syntax that works with FastAPI as one would expect, no need for unused or magic dependencies in routes.
Works with any templating engine or server-side rendering library, e.g. markyp-html or dominate.
Built-in Jinja2 templating support (even with multiple template folders).
Gives the rendering engine access to all dependencies of the decorated route.
FastAPI routes will keep working normally by default if they receive non-HTMX requests, so the same route can serve data and render HTML at the same time.
Correct typing makes it possible to apply other (typed) decorators to your routes.
Works with both sync and async routes.

https://github.com/volfpeter/fasthx

👉 @python_real
GitHub GitHub - volfpeter/fasthx: Declarative Python server-side rendering utility for FastAPI with built-in HTMX support. Declarative Python server-side rendering utility for FastAPI with built-in HTMX support. - volfpeter/fasthx
More from @python_real
  1. Sep 22, 2026🔴 Тестовый собес на Middle Python с разработчиком из Яндекса завтра вечером! [+ разбор 50…
  2. Sep 22, 2026📊 Статистика в Python: с чего начать анализ данных Среднее значение может скрыть важную д…
  3. Sep 21, 2026🐍 В Python 3.15 появится frozendict - словарь, который нельзя изменить Это встроенный тип…
  4. Sep 1, 2026🔍Тестовое собеседование на Middle Python с разработчиком из Авито завтра вечером Уже завт…
  5. Sep 1, 2026🐍 Асинхронное программирование в Python: от генераторов до asyncio Почему обычная програм…
  6. Aug 24, 2026🐍 Как использовать Claude Code для разработки и отладки проектов на Python Real Python оп…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →