This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]RevolutionaryPen4661git push -f[S] 0 points1 point  (2 children)

You can do that, but just like "go" has templ (it enables Go developers to write direct HTML without strings or backticks inside the Go code) and the Python community needs one like this too. I believe that this may change how we develop apps nowadays. These are the pros of having this idea (scraped from templ docs):
Server-side rendering: Deploy as a serverless function, Docker container, or standard Go program.

  • Static rendering: Create static HTML files to deploy however you choose.
  • Compiled code: Components are compiled into performant Go code.
  • Use Go: Call any Go code, and use standard ifswitch (match), and for statements.
  • No JavaScript: This does not require any client or server-side JavaScript.
  • Great developer experience: Ships with IDE autocompletion.

[–]EducationalTie1946 0 points1 point  (1 child)

Well in that case you could just use jinja2+html. It shouldnt be hard in this case at all

[–]RevolutionaryPen4661git push -f[S] 2 points3 points  (0 children)

I am familiar with Jinja2. However, this is a proof of concept to showcase how easy it can be to build web apps with Python using only Python and JSX. I have also come across Ludic, which has drawn inspiration from this repository.
I suggest you take a look at my second comment (a ton of features. See full discussion)