# 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.
Raw data
{
"_id": null,
"home_page": null,
"name": "lilliepy-tags",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "lilliepy, lilliepy-tags, reactpy",
"author": "Sarthak Ghoshal",
"author_email": "sarthak22.ghoshal@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/88/29/c90d95e84f0529adc07af7fbd56172f84848115d3475fe7991ce897b9a84/lilliepy_tags-0.0.2.tar.gz",
"platform": null,
"description": "# Lilliepy-Tags\r\n\r\nA 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.\r\n\r\n---\r\n\r\n## \ud83d\udce6 Features\r\n\r\n- \u2705 Supports nested tags\r\n- \u2705 Supports `{expression}` embedding inside text or tags\r\n- \u2705 Processes multiple `@component` functions per file\r\n- \u2705 Supports multiple return blocks (in if/else/loop branches)\r\n- \u2705 Converts `.x.py` files in a folder into clean Python ReactPy code\r\n- \u2705 Outputs to a `dist/` folder under a custom name\r\n\r\n---\r\n\r\n## \ud83d\udcc2 Example Input (test.x.py)\r\n\r\n```python\r\nfrom reactpy import component, run, html\r\n\r\nvar = \"Hello, world!\"\r\n\r\n@component\r\ndef App():\r\n return (\r\n <html.h1 id=\"greeting\" class=\"main\">\r\n {var}\r\n </html.h1>\r\n )\r\n\r\nrun(App)\r\n```\r\n\r\n---\r\n\r\n## \ud83d\udce6 Output (in dist/build/test.x.py)\r\n\r\n```python\r\nfrom reactpy import component, run, html\r\n\r\nvar = \"Hello, world!\"\r\n\r\n@component\r\ndef App():\r\n return (\r\n html.h1(\r\n {\r\n \"id\": \"greeting\",\r\n \"class\": \"main\",\r\n },\r\n var\r\n )\r\n )\r\n\r\nrun(App)\r\n```\r\n\r\n---\r\n\r\n## \ud83d\udcd6 Usage\r\n\r\n### \ud83d\udce6 Install dependencies (if any)\r\nCurrently no external pip dependencies needed.\r\n\r\n### \ud83c\udfc3 Run the transpiler\r\n\r\n```python\r\nfrom lilliepy_tags import Lilliepy_Tags\r\n\r\nprocess_folder(\"src\", \"dist/build\")\r\n```\r\n\r\n- `src` is the folder containing your `.x.py` files.\r\n- `dist/build` is your chosen output directory.\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "jsx like tag system for reactpy library or lilliepy framework",
"version": "0.0.2",
"project_urls": null,
"split_keywords": [
"lilliepy",
" lilliepy-tags",
" reactpy"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "034edc596e51fccbd69ae210a50d83f771957d48d9b4366c32742eabead7f89c",
"md5": "86529d08999a3c3a2ca3345e429e2a2c",
"sha256": "9d58119ee0c4120bc97b5bc5bff22b46a11032108fde91cc0a6633268b4acf4d"
},
"downloads": -1,
"filename": "lilliepy_tags-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "86529d08999a3c3a2ca3345e429e2a2c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 4112,
"upload_time": "2025-07-09T00:50:48",
"upload_time_iso_8601": "2025-07-09T00:50:48.184405Z",
"url": "https://files.pythonhosted.org/packages/03/4e/dc596e51fccbd69ae210a50d83f771957d48d9b4366c32742eabead7f89c/lilliepy_tags-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "8829c90d95e84f0529adc07af7fbd56172f84848115d3475fe7991ce897b9a84",
"md5": "4bc3dafef49d5699bab5bbe8b897671c",
"sha256": "53ada73c29ebd6393d7b6191de5717ae5cc8d879d8259e7853a991ca7d92752e"
},
"downloads": -1,
"filename": "lilliepy_tags-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "4bc3dafef49d5699bab5bbe8b897671c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 3838,
"upload_time": "2025-07-09T00:50:48",
"upload_time_iso_8601": "2025-07-09T00:50:48.907354Z",
"url": "https://files.pythonhosted.org/packages/88/29/c90d95e84f0529adc07af7fbd56172f84848115d3475fe7991ce897b9a84/lilliepy_tags-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-09 00:50:48",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "lilliepy-tags"
}