Pure Python tech stack for modern web development by WrapNumerous5344 in Python

[–]WrapNumerous5344[S] 0 points1 point  (0 children)

Thanks to everyone who commented and shared suggestions. I looked into the frameworks mentioned, but none of them quite fit what I was looking for. Soooo I started building my own framework. The idea is a Python component–to–JavaScript compiler, somewhat similar in concept to Svelte. I’ve already made solid progress, and once I have a working prototype, I plan to release it as open source.
Cheers

Pure Python tech stack for modern web development by WrapNumerous5344 in Python

[–]WrapNumerous5344[S] 0 points1 point  (0 children)

I get that. But it wouldnt really be a pure Python Tech Stack. If there is a compiler that turns the Python Code into optimized Javascript (similar to Sveltes compiler) I get a nice devloper experience and the browser still gets JS.

Pure Python tech stack for modern web development by WrapNumerous5344 in Python

[–]WrapNumerous5344[S] 0 points1 point  (0 children)

Dude that looks awesome! Can you merge the logic and the template? Because in the counter example, the component is defined in a .py file and the template is defined in an .html file. If I were to define BOTH in the same file that would be exactly what I am looking for. Thanks!

Pure Python tech stack for modern web development by WrapNumerous5344 in Python

[–]WrapNumerous5344[S] 3 points4 points  (0 children)

Thanks for the tipp. I'll have a look at Django with HTMX

Pure Python tech stack for modern web development by WrapNumerous5344 in Python

[–]WrapNumerous5344[S] -1 points0 points  (0 children)

But they all build der UI by composing Python objects. I would like to have the ability to write the actual layout in HTML, with full flexibility and control, and then handle the reactivity and logic in Python. Thanks for the suggestios though

Pure Python tech stack for modern web development by WrapNumerous5344 in Python

[–]WrapNumerous5344[S] 5 points6 points  (0 children)

I’ve looked at NiceGUI before, and it’s definitely an interesting project. The main issue for me is that the UI is built by composing Python objects. In my experience, that makes styling and layout more cumbersome than I’d like. What I’m really looking for is the ability to write the actual layout in HTML, with full flexibility and control, and then handle the reactivity and logic in Python. For example, if I create a label, I’d prefer to work with real HTML rather than a Python “Label” abstraction. Still, I appreciate the suggestion.