# htpy - HTML in Python

**URL:** <https://forum.djangoproject.com/t/htpy-html-in-python/29447>\
**Category:** Show & Tell\
**Created:** [March 24, 2024, 8:12pm UTC](https://forum.djangoproject.com/t/htpy-html-in-python/29447 "2024-03-24T20:12:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pelme](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/pelme/32/11090_2.png) [@pelme](https://forum.djangoproject.com/u/pelme)\
**Post date:** [March 24, 2024, 8:12pm UTC](https://forum.djangoproject.com/t/htpy-html-in-python/29447/1 "2024-03-24T20:12:22Z")

</div>

We are long time Django users and have been increasingly using static typing and doing more on the server lately (with htmx).

We started generating html directly in python instead of using templates. Partials and creating components becomes straightforward. It looks a bit different and takes a little bit getting used to but we are really enjoying it so far.

Give it a try and let us know what you think:

[https://htpy.dev/](https://htpy.dev/)

> **[GitHub - pelme/htpy: Generate HTML from Python](https://github.com/pelme/htpy)**
>
> Generate HTML from Python. Contribute to pelme/htpy development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![leandrodesouzadev](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/leandrodesouzadev/32/8981_2.png) [@leandrodesouzadev](https://forum.djangoproject.com/u/leandrodesouzadev)\
**Post date:** [March 25, 2024, 1:31pm UTC](https://forum.djangoproject.com/t/htpy-html-in-python/29447/2 "2024-03-25T13:31:46Z")

</div>

This looks interesting!  
Thanks for contributing to the python’s community!
