genjuice 0.1.4
GenJuice
A lightweight, component-based HTML builder.
from genjuice import Component
from genjuice.components import Button
class FancyButton(Component):
def render(self):
return Button("Hello, world!").attr(onclick="alert(1)").render()
>>> FancyButton().render()
"""
<button onclick="alert(1)">Hello, world!</button>
"""
Installation
GenJuice isn't quite ready for production yet. Feel free to mess around with it though :)
pip3 install genjuice
Why GenJuice?
The core functionality (Component.render()) is 20 lines long
On average, it's 2.2x faster than its counterparts (HTML builders/template engines such as Jinja)
You write your UI code in 100% Python
A modern, intuitive API
...and much more to come!
License
MIT
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.