Hacker News new | ask | show | jobs
by fermigier 823 days ago
I have been working on a (currently half-baked) similar project:

- <https://github.com/abilian/webbits>

Inspirations for the idea of generating HTML code from Python:

- <https://www.yattag.org/>

- <https://tylerbakke.github.io/MarkupPy/>

- <https://github.com/michaeljones/packed>

- <https://github.com/twidi/mixt/>

- <https://github.com/byteface/domonic>

- <https://pypi.org/project/hyperpython/>

- <https://pypi.org/project/PyHTML/>

- <https://github.com/jviide/htm.py>

- <https://viewdom.readthedocs.io/>

- <https://github.com/pcarbonn/fast_html>

- <https://github.com/sanic-org/html5tagger>

- <https://github.com/j4mie/hotmetal/>

2 comments

Wish GVR updates pyxl4(used by Mixt) and includes it into Python. It could be used for html, xml, yaml and its config language friends and declarative UIs like React. IMO if and for are better implemented in Jinja or JSX better than Python's ternary and list comprehension. Comparison at bottom.

Most of the frameworks here are calling side effects upon shared objects in the guise of `with` statements. Not to mention the extreme verbosity.

> <if cond>

> <long code 1>

> <else>

> <long code 2>

>

> [longcode1() if cond else longcode2()]

>

> <for i in ls>

> <long code 1>

>

>[longcode() for i in ls]

I can only say that I like fast_html and how simple it is. Very easy source to read and understand. It is based on generators internally.

I started using it for some documentation generation purposes. I'm not a web-dev.