Awesome Python HTMX
And Other Thoughts on PyCon 2023
So I recently went to PyCon 2023 and it was awesome. I kept myself busy with a lot of little tasks, but the highlight of this post came at the tail end of my stay during the first day of sprints. It was a bookend to the way I started the event. I started with a tutorial titled Web Development With A Python-backed Frontend: Featuring HTMX and Tailwind and I somehow finished as co-maintainer of the PyHAT: Awesome Python htmx repository.
Let Me Explain
Okay, so I should probably do at least a little backtracking.
PyCon US 2023 was held in Salt Lake City on April 19-27. Approximately 2,200 people attended in person, with another 450 or tuning in online.
I'm sure I'll say this more than just once, but if you've never been to PyCon, I'd encourage you to go, at least once. Even if you're not all that experienced in Python or programming, or even if you're only tangentially interested.
The reasons for this are several, but most of all, I think it would open up a view into a community that is both inclusive and purpose-driven. This is true for many of the attendees as well as the organizers and maintainers of large, important, open-source projects.
I mean, the opening keynote by Ned Batchelder was on how to talk to people!
Selfie with Ned!
Fly on the Wall
Those who know me well have no trouble seeing me as a "fly on the wall" sort of person. If I end up at social gatherings, I tend to mingle in the outskirts or find safety in conversation with someone I already know.
Those that know me from PyCon might think the opposite.
Worker Bee
Let me try to summarize some of the things I got involved in for PyCon 2023:
- Volunteered as a back end manager for the online platform used for the conference
- Volunteered as a "booth fairy" to help plan for and set up the Python Software Foundation's (PSF) booth
- Presented a 3.5-hr tutorial on using a Python-backed front end (featuring htmx and Tailwind)
- Gave a 30 minute talk on app dependencies and managing them with a package manager (I use pdm)
- Hosted a 1-hr open space for further discussion on Python, htmx, Tailwind
- Spent time answering questions at the PSF booth
- Gave a 5-minute lightning talk on being a "fly on the wall" or "busy worker bee"
- Did small interview segments for two different podcasts (Talk Python and Python Community News)
- Made new friends and took several selfies
- Accidentally became a co-maintainer of an open source project called Awesome Python HTMX
Booth fairies setting up the PSF booth
Yikes
Now I know what you're thinking. Had I seen a list like this prior to attending PyCon, I may have cringed a little bit. That seems like a lot. But in reality, it's just part of what makes PyCon special.
There is a ton of work that the organizers do to put on an event like this for the community. That's actually a massive understatement. The work they do is phenomenal.
In addition, the developers and maintainers who make the Python ecosystem such a thriving and welcoming space are also very giving of their time/energy/resources.
Selfie with Sebastian Ramirez, creator of FastAPI!
In that respect, my contribution is only a drop in the bucket in terms of what makes the Python community so special.
Awesome
But that's a lot of preamble for what I actually was meaning to write about.
A strange side-effect of staying for one day of PyCon sprints (note to self: stay for PyCon sprints) is that I ended up becoming a co-maintainer of an open source project. Not only do I not know how to do that... no, actually, that's it. I don't know how to do that.
But that's okay.
One of the many things I learned at PyCon is that there is a messy, wonderful beauty about collaboration.
While sitting at an open space, chatting with a lot of seasoned and newbie web developers (I'm of the latter), I took a moment to converse with another individual about a question he had. He asked me if I had any opinion on how he could take (mumble mumble technical jargon tasks mumble) and maybe use FastAPI to (mumble jargon tech tasks mumble queue task jargon).
Posing with Michael Kennedy, Chris May, and Michael Riley after attending open space on web frameworks.
Seeing as how we were presently sitting with several individuals that had a breadth of knowledge that spanned decades (if not a century), I opened up the question to the group.
What resulted was a wonderful cascade of suggestions and viewpoints that I could never have replicated on my own (and would make ChatGPT cry, most likely).
More Awesome
Which finally brings me back to the topic at hand.
You see, my very first task at PyCon was to deliver a 3.5 hour tutorial on using Python to create a web application using htmx and Tailwind.
What was I getting myself into?
This led to further conversations at an open space, and eventually, toward an idea that I further developed with my newly-met collaborator, Benjamin Kirkbride.
What we figured is that there is a palpable excitement within the Python ecosystem to deliver hypermedia driven applications (aka, web apps sans JavaScript), but so far, there does not seem to be a unified approach/common parlance around the subject.
We decided to start with a curated list of things related to Python and htmx, and this quickly morphed into an "awesome" repo.
Benjamin's a real hero, here, as he took it upon himself to sift through many, many packages (many), as well as reaching out to maintainers to introduce the PyHat repo and spur the discussion.
We also came up with a name.
PyHAT
I mean... naming things is the worst, but it'll have to do for now.
It stands for: Python HTMX ASGI Tailwind
This is what we're calling the stack, so far.
It is meant to emphasize a declarative approach to creating web applications, using nothing more than Python and HTML (as htmx and Tailwind both primarily involve utilizing HTML elements directly)—focusing on the Locality of Behavior principle to make things as obvious as possible.
Awesome HTMX Tailwind
You can find the result of our labor on Github. It is called Awesome Python htmx.
So far, the response to the project has been very positive.
We've had involved, well-thought out discussions, as well as generally good feedback.
We want to build on that momentum and are open to more feedback and/or suggestions.
Please stop by and say hello!
In Conclusion
And that about wraps up this post. You may be hearing about PyHAT some time in the future... but if not...
Go to PyCon. We can chat about it next year in Pittsburgh!
See you there!