Metadata-Version: 2.4
Name: lilliepy-tags
Version: 1.0.0
Summary: jsx like tag system for reactpy library or lilliepy framework
Author: Sarthak Ghoshal
Author-email: sarthak22.ghoshal@gmail.com
License: MIT
Keywords: lilliepy,lilliepy-tags,reactpy
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: keywords
Dynamic: license
Dynamic: requires-python
Dynamic: summary

# Lilliepy-Tags

A JSX-like transpiler for [ReactPy](https://reactpy.dev/) projects written in Python. This tool allows you to write familiar JSX-style syntax inside Python component return blocks, and transpile them into proper ReactPy functional calls.

---

## 📦 Features

- ✅ Supports nested tags
- ✅ Supports `{expression}` embedding inside text or tags
- ✅ Processes multiple `@component` functions per file
- ✅ Supports multiple return blocks (in if/else/loop branches)
- ✅ Converts `.x.py` files in a folder into clean Python ReactPy code
- ✅ Outputs to a `dist/` folder under a custom name

---

## 📂 Example Input (test.x.py)

```python
from reactpy import component, run, html

var = "Hello, world!"

@component
def App():
    return (
        <html.h1 id="greeting" class="main">
            {var}
        </html.h1>
    )

run(App)
```

---

## 📦 Output (in dist/build/test.x.py)

```python
from reactpy import component, run, html

var = "Hello, world!"

@component
def App():
    return (
        html.h1(
            {
                "id": "greeting",
                "class": "main",
            },
            var
        )
    )

run(App)
```

---

## 📖 Usage

### 📦 Install dependencies (if any)
Currently no external pip dependencies needed.

### 🏃 Run the transpiler

```python
from lilliepy_tags import Lilliepy_Tags

process_folder("src", "dist/build")
```

- `src` is the folder containing your `.x.py` files.
- `dist/build` is your chosen output directory.
