A lightweight, component-based HTML builder
Project description
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
genjuice-0.1.4.tar.gz
(23.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
genjuice-0.1.4-py3-none-any.whl
(63.4 kB
view details)
File details
Details for the file genjuice-0.1.4.tar.gz.
File metadata
- Download URL: genjuice-0.1.4.tar.gz
- Upload date:
- Size: 23.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.5 Darwin/19.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a22750f65a0bea2d8b72fbb1d78a6695d58a98725831e70c423495c50856bb3
|
|
| MD5 |
c94abb425f83c28567f08355eb7c8b54
|
|
| BLAKE2b-256 |
7b6234702e7b35f69d3bfd3cc1fcb60410f87e756613c0b2f5a8bd91c8be7909
|
File details
Details for the file genjuice-0.1.4-py3-none-any.whl.
File metadata
- Download URL: genjuice-0.1.4-py3-none-any.whl
- Upload date:
- Size: 63.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.5 Darwin/19.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e331c2860a7ae649b2b9a163db0aecb349fc37b3fdb26b870760a07ef8c1027
|
|
| MD5 |
7b3e2948e2b04b6dda3bfa2be57942d0
|
|
| BLAKE2b-256 |
d064973bf7ee0a954a2d05736d8e27f941b292d0e2e7c030fe6ff995643fbd96
|