Metadata-Version: 2.1
Name: genjuice
Version: 0.1.1
Summary: A lightweight, component-based HTML builder
Home-page: https://github.com/docyx/genjuice
License: MIT
Keywords: html,template,css,web
Author: docyx
Author-email: oliverxur@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Internet
Classifier: Typing :: Typed
Requires-Dist: bleach (>=3.2.1,<4.0.0)
Project-URL: Documentation, https://github.com/docyx/genjuice
Project-URL: Repository, https://github.com/docyx/genjuice
Description-Content-Type: text/markdown

# GenJuice

<p align="center">
    <img src="https://img.shields.io/pypi/l/genjuice?style=for-the-badge">
    <img src="https://img.shields.io/pypi/pyversions/genjuice?style=for-the-badge">
    <img src="https://img.shields.io/github/languages/code-size/docyx/genjuice?style=for-the-badge">
    <img src="https://img.shields.io/github/issues-raw/docyx/genjuice?style=for-the-badge">
</p>


A lightweight, component-based HTML builder.

```py
from genjuice import Component
from genjuice.components import Button

class FancyButton(Component):
    def render(self):
        return Button("Hello, world!").attr(onclick="alert(1)").render()
```

```py
>>> 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:

```
pip install genjuice
```

## Why GenJuice?

- The core functionality (`Component.render()`) is less than 30 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 (including CSS!)
- A modern, intuitive API
- ...and much more to come!

## License

[MIT](./LICENSE)

