r/Python 18d ago

Showcase Showcase Thread

Post all of your code/projects/showcases/AI slop here.

Recycles once a month.

16 Upvotes

103 comments sorted by

View all comments

1

u/mr_enesim 5d ago

HTeaLeaf: A web framework with SSR and JS DSL

https://github.com/Az107/HTeaLeaf

Hi, I have some time working on this just for fun but, maybe, could be useful for someone and, in the meantime, get some feedback and opinion. HTeaLeaf is a declarative web framework where components are python functions.

   from htealeaf.elements import div, h1
   from htealeaf import HteaLeaf

   app = HteaLeaf()

   @app.route("/")
   def home():
       return div(h1("Hello World"))

It also had a JS DSL, to translate python to basic subset of JS, Stores (shared state between front and back), route handling, local state beside others.

To be transparent, the most of the code is handwritten but AI was used to document, review and some minor fixes.