18 ms·
Hyperflask – Full stack Flask and Htmx framework
- sgt 1y agoFor some reason every time project has a starfield demo, I keep looking for the speed toggle somewhere, and I also expect it to follow my mouse cursor. Maybe in the next version of the Hyperflask website! However, the project itself looks great. I love Htmx, although I have to admit I started looking at Datastar recently.
- host0 1y agoRun in console: new WarpSpeed("warpdrive", { "speed": 20, "speedAdjFactor": 0.03, "density": 2, "shape": "circle", "warpEffect": true, "warpEffectLength": 5, "depthFade": true, "starSize": 3, "backgroundColor": "hsl(224,15%,14%)", "starColor": "#FFFFFF" });
- sgt 1y agoSeatbelt on!
- andersmurphy 1y agoYou mean like this one? https://data-star.dev/ https://data-star.dev/
- sgt 1y agoSpot on! That's why I remembered it so well and I guess associated it with HTMX
- hokumguru 1y agohttps://nova.app/ https://nova.app/ still the best I've seen.
- CiTyBear 1y agoCurious choice of backend python. Indeed Flask is a famous python framework but it seems it has been completely overshadowed by FastAPI. I would suggest "HyperFastAPI"
- falcor84 1y agoBut this is about html rather than API endpoints; Flask seems like a much more appropriate choice.
- nop_slide 1y agoAfter using both Flask and FastAPI extensively I can attest that Flask is the better technology. Flask is extremely stable and has solid organization around them via Pallets. This is a great benefit as they are keeping the ecosystem moving forward and stable. https://palletsprojects.com/ https://palletsprojects.com/ Versus FastAPI which is lead by a single maintainer which you can search back on HN about opinions on how he's led things. Flask also has at time of writing only 5 open issues and 6 open PRs, while FastAPI has over 150 PRs open and 40 pages(!) of discussions (which I believe they converted most of their issues to discussions). Lastly on the technical side, I found Flasks threaded model with a global request context to be really simple to reason about. I'm not totally sold on async Python anymore and encountered odd memory leaks in FastAPI when trying to use it.
- odie5533 1y agoFlask is missing... pydantic, dependency injection, openapi, swagger, real async.
- nop_slide 1y agohttps://github.com/pallets-eco/flask-pydantic https://github.com/pallets-eco/flask-pydantic https://luolingchun.github.io/flask-openapi3/v4.x/ https://luolingchun.github.io/flask-openapi3/v4.x/ > dependency injection While nice I never found this to be a critical deciding factor of using a technology. > real async If you really want it there is Quart which is real async https://github.com/pallets/quart https://github.com/pallets/quart I'm not a huge async fan in python anymore so not it's not a huge issue for me. But there are definitely options for Flask if you want to use async.
- grim_io 1y agoIt looks really well done. I'll definitely keep an eye on it until it hopefully matures.
- mrits 1y agoI’ve been using htmx with basic Django views for a couple years. It’s been great. I was originally concerned that the htmx was getting hard to maintain. But in my case I got to a point where I never have to look at it again. I wouldn’t recommend htmx for a team of more than 1 person or someone that has a lot of time to focus on the frontend. It was a great balance of rapid prototyping and solid enough to not have to worry about it
- OutOfHere 1y ago> I wouldn’t recommend htmx for a team of more than 1 person Why is this? Do larger teams have time for busywork that they can't fill with HTMX?
- mrits 1y agoThere isn't any real inherit project structure. Opinionated frameworks often work better with multiple people involved.
- globular-toast 1y agoIsn't every project an ad hoc opinionated framework? You can do code reviews etc to get some alignment and not have everyone working against each other.
- mrits 1y agoNo, every project certainly isn't opinionated. There are a lot of approaches you can take to get there but I wouldn't recommend discussing alignment after the code is already written and trying to get large groups to agree.
- jcmontx 1y agoAfter using HTMX for some time with different frameworks, I've come to prefer Go + Templ + HTMX. Good match between versatility and simplicity!
- hunvreus 1y agoNext stack I wanna try (right now I'm on FastAPI + Jinja2 + HTMX).
- itsnowandnever 1y agoI made the switch from FastAPI + Jinja + HTMX to Go and embedding the HTML into the Go binary directly... it's very nice being able to run the apps without an interpreter. I'm able to make ~5MB sized containers to run the full stack there's a performance increase too, but these apps I'm talking about are so simple it's not enough to really notice. objectively FastAPI is really good and makes running a simple site so easy, I'd still recommend to most people using that.
- callamdelaney 1y agoI've found it quite annoying, I'm considering going the other way for my personal project from Go+Templ+HTMX -> Flask + Jinja + HTMX. Still undecided though. I feel like Go is quite verbose and defining templates in Templ feels painful.
- jollyllama 1y ago> Batteries included Yeah, there's a lot of dependencies here - like a dozen other Flask extensions. When I saw this, I was excited about the component system, but it's too bad that it's so far from just being Flask and HTMX.
- emixam 1y agoThe framework is composed from many extensions indeed. You can use them independently though! The component system is not fully independent because it depends on multiple other extensions but it mostly is as this extension: https://github.com/hyperflask/flask-super-macros https://github.com/hyperflask/flask-super-macros On the GitHub organization there is a list of all the extensions that are built as part of the project: https://github.com/hyperflask https://github.com/hyperflask
- emixam 1y agoHello, author of hyperflask here. I'm happy to finally announce this project as I've been working on it for quite some time. I made an announcement post here: https://hyperflask.dev/blog/2025/10/14/launch-annoncement/ https://hyperflask.dev/blog/2025/10/14/launch-annoncement/ I love to hear feedback!
- drunx 1y agoAs a big fan of python and htmx... I'm loving it! Would check it out asap!
- vb-8448 1y agojust out of curiosity: did you consider unpoly.js or alpine-ajax instead of htmx? If yes, why did you choose htmx instead of others?
- emixam 1y agoI knew of unpoly but didn't know about alpine-ajax. My choice was set on htmx since the beginning. I feel it's a more mature solution with more flexibility.
- nodesocket 1y agoThis looks awesome. I’m building an app in pure Flask using Tailwind + DaisyUI + Bootstrap Icons which looks to be the exact stack you’ve gone with. Though admittedly I am just writing raw JavaScript without a JS framework.
- alex_suzuki 1y agoI‘m doing this as well, and I really like the simplicity and „no build steps“ approach. Everything is rendered server-side, with sprinkles of modern JS where needed or useful, powered by some JSON-serving routes in the same flask app. A CSS framework on top to make it look good. Basically more or less how we built web apps 15 years ago. :-)
- elevation 1y ago
- hunvreus 1y agoSome interesting concepts: - Components: https://hyperflask.dev/guides/components/ https://hyperflask.dev/guides/components/ - Bundling view and controller in the same file: https://hyperflask.dev/guides/interactive-apps/ https://hyperflask.dev/guides/interactive-apps/ I think these may be footguns though. Components for example are just a regular macros under the hood. Why not use macros then? I'm also curious about the choice of Flask. I started with a similar approach for /dev/push [1], but ended up moving to FastAPI + Jinja2 + Alpine.js + HTMX once I figured out FastAPI wasn't just for APIs. I wanted proper async support. I love Flask, but don't you find it limiting? [1]: https://github.com/hunvreus/devpush https://github.com/hunvreus/devpush
- reality_inspctr 1y agoyeah fastapi + htmx is very effective.
- fletchowns 1y ago> Bundling view and controller in the same file It reminds me of how PHP development used to be back in the day. That's not meant as a bad thing, I always liked how simple it made the development process for the right size project.
- rdedev 1y agoI moved to Quart instead. It's flask with async support built by the same developer.
- hunvreus 1y agoQuart was interesting, but it didn't seem to have as much traction as FastAPI. I also seem to understand Flask is trying to integrate some of Quart's ideas.
- sahillavingia 1y agoWhat is the largest app powered by this framework?
- _vqpz 1y agoThis is a brand new framework.
- emixam 1y agoI've built SQLify with it: https://sqlify.me https://sqlify.me
- itsnowandnever 1y agoalright, everyone - let's send 10Tbps to SQLify to test the performance of emixam's new framework
- emixam 1y agoI would be glad having some users on this project but that would definitely kill it !
- itsnowandnever 1y agohaha no worries, it's a great site, though! congrats!
- vladsanchez 1y agoLovely!
- deleted 1y ago[deleted]
- andrewmcwatters 1y ago[dead]
- deleted 1y ago[deleted]
- turtlebits 1y agoThis feels like a contradiction to what Flask (and) htmx are. There are way too many abstractions going on. Also I don't see any integration with htmx at all? I was expecting something like what FastHTML does where htmx is essentially built in.
- steinvakt2 1y agoI love FastHTML!
- fvdessen 1y agoI have been using htmx to build a web app and came to the conclusion that it is a dead-end. The main problem is that the state of your frontend application is in the URL. This is not flexible enough for modern UI where you might have many different zones, widgets, popups, etc. that all need their own local navigation, activation states etc. Putting all of this in a single global url is extremely hard. Designing your app so that you don't need to put it all in the global url is harder. This problem is trivially solved by React / Vue that all provide their version of a state store that can hold the state, and make it easy as well to have elements shared or not between the tabs of your browser. If you build your applications like phpBB forum this is not a problem, but nowadays users expect better.
- mervz 1y agoIt's a dead end for your use case, let's be very clear about that. And it's funny that you think anything about React and/or Vue is 'trivial'.
- nawgz 1y agoSurely you’re not saying the frameworks famous for ui = f(state) actually suck at managing state…
- jaredcwhite 1y agokinda does, tbh.
- the_gipsy 1y agoIf it only were true. React is nothing like ui = f(state). More like ui = f(some_trivial_state) + lifecycles magic + probably global_state. Garbage. But effective devrel.
- nawgz 1y agoThis type of dismissive attitude is so strange to me. The only reason "lifecycles magic + probably global_state" would be causing your app to behave unpredictably is - this is going to shock you - because you closed your mind to a tool by dismissing it as garbage before you used it, and then failed to use it properly because you think its popularity boils down to PR. For instance, you could entirely forgo the influence of lifecycles and global state by putting everything in a top-level Context with 1 state object that you only ever update by calling `setState`. After that, you might find reasons to optimize your app, which could lead you to more interesting approaches like reducers or state management libraries or memoization, but I'm guessing you would never get that far and just go back to what you were doing before, since YOUR preferences are battle hardened and reliable software, while things you don't know about are only popular because of Facebook. Obviously.
- hedgehog 1y agoIn my experience with Django the admin scaffolding saves a lot of work building UI for diagnostic and customer service workflows. Projects on other frameworks that I've been involved with end up rebuilding a lot of that stuff in their own codebase, more work and often not as good of a result. There are a lot of aspects of frameworks like Hyperflask that look attractive relative to Django but foregoing the admin framework is a high price to pay. Are there some alternate patterns other people are finding successful?
- emixam 1y agoThere is Flask-Admin but it's more bare bone than Django Admin. I plan to tackle the problem in the future.
- stuaxo 1y agoI thought the same but moving to fastapi the thing I missed most from Django is the applications that make up a django project. Having migrations, static files and templates for one aspect of a project all grouped together is so useful and I didn't realise until I didn't have it.
- waterproof 1y agoI often run my projects on Supabase and then the Supabase UI becomes a backstop where I can teach my admin users to do things if they really have to. That, or just use Airtable as a backend, if you can get away with it. Mostly I agree with you though, I got swept up with lots of "recent tools & frameworks" projects and I really miss the Django admin. Django+HTMX has always seemed like a tempting option.
- pplante 1y agoI poked around at the code and I like some of the concepts here. Introducing jinjapy as a jinja template with frontmatter allowing me to write python code is useful in some scenarios. I got most excited about sqlorm (https://github.com/hyperflask/sqlorm https://github.com/hyperflask/sqlorm). It is way too early to feel comfortable adopting this, but I really like the concepts. I use pydantic a lot, I would love to see the SQL as docstrings as a pydantic extension. I get tired of writing serializers everywhere and would prefer to have a single pydantic model to reference throughout my codebase. Primarily I use Django, but these days am using less and less of the framework batteries outside of the ORM.
- emixam 1y agoThanks ! I've introduced a lot of stuff with this project and I'm glad someone noticed :D I've also submitted SQLORM on HN if it's of interest to others: https://news.ycombinator.com/item?id=45607688 https://news.ycombinator.com/item?id=45607688
- evantbyrne 1y agoAt first glance, I don't understand the design choice of appending HTML templates to the python controller files. Seems like a lot of complexity just to remove a template render call. What am I missing?
- emixam 1y agoIt's in sync with the Locality of Behavior [0] principle that htmx follows. It's inspired by Astro Pages [1] which are the same thing in the javascript world. I really liked the developer experience working with them. [0] https://htmx.org/essays/locality-of-behaviour/ https://htmx.org/essays/locality-of-behaviour/ [1] https://docs.astro.build/fr/basics/astro-pages/ https://docs.astro.build/fr/basics/astro-pages/
- awoimbee 1y agoBuilding a framework on a non-async foundation (flask) in 2025 is bizarre. The only way to scale a flask API is to use gevent, which is just problems waiting to happen. Asyncio is just better, safer and has been adopted by the industry.
- mattbillenstein 1y agoI think you lack perspective - there is still a lot of sync code being written - I'd argue probably most deployed python is not async. And most apps don't need crazy scale, they need simplicity.
- callamdelaney 1y agoYep, async is not even advantage in my view - especially if it requires writing code in certain special ways.
- myko 1y agoI was surprised to use the search feature and not see Quart mentioned: https://hyperflask.dev/guides/setup/ https://hyperflask.dev/guides/setup/ I've been thinking about Flask and Quart pretty much interchangeably for awhile now and use Quart for Python backends. For those who aren't aware Quart is the async Flask and they share system internals, it is usually easy to use something created for Flask for Quart.
- JSR_FDED 1y agoI’ve had no problems with gevent at all (the opposite actually). What have you run into?
- awoimbee 1y agoI ran into: - too high memory usage - no warning when a task doesn't yield - monkey patching: * general confusion like threading.local behaving differently * pain to integrate sentry in gunicorn with gevent since you need to import sentry after monkey patching. The OTel libs work better but you need to be careful * all compiled libs need to be replaced (eg psycogreen) ...
- focom 1y agoin the same vein i prefer https://plainframework.com/ https://plainframework.com/ plain keep the admin dashboard and is very agent friendly
- rodolphoarruda 1y agoAs a PHP guy and Htmx enthusiast, I wonder if the same result could be achieved with a framework like Slim; having just html files making requests to the middleware via the front-controller.
- arjie 1y agoI have an admin dashboard built with FastAPI and HTMX and SQLalchemy entirely LLM-based and it was pretty easy to build. Claude Code with a puppeteer MCP is able to look at what it's building, screenshot, fill entries and build an overall fairly response UI. One thing that it screws up is it sometimes renders whole pages into a partial but fortunately when given an MCP to look at the browser it fixes it all autonomously. A fast cycle time is key when working with LLMs because they are good at adjusting to errors but bad at getting things right first time. So I like the HTMX-based stack.
- rvitorper 1y agoI like it. Simple, easy, htmx and Flask, batteries-included. Exactly what I was looking for
- rubenvanwyk 1y agoA lot of people in this thread mentioning the limitations of Flask and “why not FastAPI” etc - but I’ve found Litestar to be the best alternative and it has htmx support out of the box. https://litestar.dev/ https://litestar.dev/
- clickety_clack 1y agoI really like Jeremy Howard’s FastHTML, though it’s still a bit immature. Anyone who likes the idea of combining a FastAPI-ish (starlette) backend and htmx should check it out.
- whatever1 1y agoWhy are you writing this to us? Let claude and codex know instead. They will be the ones using it.
- sublinear 1y agoThis seems like such a desperate attempt to put syntax before everything else. I can't think of a worse modern combination than flask and htmx for professional production use.
- michaelyin 1y ago[dead]
- v3ss0n 1y agoCheck Litestart if you want a Fullstack Async Experience for HTMX. https://litestar.dev/ https://litestar.dev/
- fasteo 1y agoSlighthy offtopic, but I have been using xmlui[1] (paired with Flight PHP framework [2]) lately for some internal tools and it has worked really well. [1] https://www.xmlui.org/ https://www.xmlui.org/ [2] https://docs.flightphp.com/en/v3/ https://docs.flightphp.com/en/v3/
- tracker1 1y agoJetbrains has released support for similar work in C# (ASP.Net). In case anyone is interested in similar tooling. https://www.jetbrains.com/guide/dotnet/tutorials/htmx-aspnetcore/introduction/ https://www.jetbrains.com/guide/dotnet/tutorials/htmx-aspnet...
- panagathon 1y agoThis looks unreal!