peter

@volfpeter
21 Followers
25 Following
148 Posts
Full-stack engineer.
Simple is better than complex.
Homehttps://www.volfp.com/
GitHubhttps://github.com/volfpeter
While at it, there'll be a new patch version of htmy that removes the async-lru dependency in favor of anyio.

Open sourced htmui: a typed HTML component library for Python hypermedia apps.

It has most of the BasecoatUI components (shadcn-like for non-React) plus some utilities.

Also serves as a holm + htmy demo.

https://htmui.vercel.app/

#python #fastapi #htmx #webdev

htmui

I've finally released holm v0.9

The main feature is that you can now have your layouts in plain HTML files!

holm automatically loads HTML layouts, processes them using a simple, fully customizable pipeline, and swaps in child content for you.

The main benefit of this approach is performance: a large, mostly static HTML element tree can be replaced with single component.

If you're curious, check out the guides here: https://volfpeter.github.io/holm/guides/html-layout/

#Python #FastAPI #HTMX #webdev

HTML layout - holm

A study by Anthropic(!):

"We found that using AI assistance led to a statistically significant decrease in mastery. On a quiz that covered concepts they’d used just a few minutes before, participants in the AI group scored 17% lower than those who coded by hand, or the equivalent of nearly two letter grades. Using AI sped up the task slightly, but this didn’t reach the threshold of statistical significance."

https://www.anthropic.com/research/AI-assistance-coding-skills?e45d281a_page=1&utm_cta=website-be-trending-cloud-marketing-dummies-ebk&mkt_tok=aw.ds

How AI assistance impacts the formation of coding skills

Anthropic is an AI safety and research company that's working to build reliable, interpretable, and steerable AI systems.

Some context: layouts are usually mostly static and contain plenty of HTML elements, so rendering them with htmy is not the most efficient solution.

Supporting plain HTML - through htmy's Snippet with Slots - is way better.

Being able to work with plain HTML for layouts is also quite convenient.

FWIW: holm (and htmy) already has built-in HTML and even markdown support. You just needed a couple of lines of Python code until now.

Working on adding support for plain HTML layouts to holm.

This will also allow full HTML rendering customization, so you could even plug in tools like Jinja or Chameleon.

The feature and the examples are ready. Now comes the documentation.

If interested, feel free to check the PR and comment on the issue: https://github.com/volfpeter/holm/issues/52

@davidbrochart I'm curious if this is something you'd find useful, and if so, what you'd need.

#python #fastapi #htmx #web

Support plain HTML layouts · Issue #52 · volfpeter/holm

Idea: Use Snippet with Slots and a TextProcessor to render dynamic content in an HTML file. Allow layout.html instead of layout.py, but layout.py should take precendence. If a layout.html is found ...

GitHub

FastHX (server-side rendering and HTMX utility for FastAPI) now supports async HTML streaming.

More details in the release note and the PR: https://github.com/volfpeter/fasthx/releases/tag/v3.1.0

This means holm also supports async HTML streaming, although it's not the default for now: https://volfpeter.github.io/holm/

This may be the best time to give holm a try if you start a web project, especially if you use HTMX.

Happy new year to everyone!

#Fastapi #htmx #webdev #python

Release v3.1.0 - Async HTML streaming support · volfpeter/fasthx

What's Changed Move to uv and zensical by @volfpeter in #89 Examples now work with htmy >=0.10 by @volfpeter in #89 Async HTML streaming support by @volfpeter in #91 Add HTML streaming example app...

GitHub

htmy 0.10 is now on PyPI!

The major feature is async HTML streaming, plus some performance improvements.

Also moved the docs to @zensical - thanks for the mkdocs config support! It made the transition super easy.

Next steps: bring async HTML streaming to FastHX (FastAPI ❤️ HTMX) and holm, to have a compelling FastAPI-based FastHTML replacement.

Link: https://volfpeter.github.io/htmy/

#webdev #python #html #htmx #fastapi #fasthtml

htmy - htmy

Finally upgraded to #fedora 43. It only took a couple of minutes, couldn't have been smoother... #linux 🤘

Released holm 0.6 with a big new feature: actions.

If you don't know, it's a Python SSR framework for HTMX, built with FastAPI. Think FastHTML on steroids with NextJS-like DX.

There's now a 5min guide for those in a hurry, and plenty of examples: https://volfpeter.github.io/holm/in-a-hurry/

I would love your feedback (or a boost to get out of my tiny network 😃).

#Python #FastAPI #HTMX #webdev

In a hurry - holm