jsx like tag system for reactpy library or lilliepy framework
Project description
Lilliepy-Tags
A JSX-like transpiler for ReactPy 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
@componentfunctions per file - ✅ Supports multiple return blocks (in if/else/loop branches)
- ✅ Converts
.x.pyfiles in a folder into clean Python ReactPy code - ✅ Outputs to a
dist/folder under a custom name
📂 Example Input (test.x.py)
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)
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
from lilliepy_tags import Lilliepy_Tags
process_folder("src", "dist/build")
srcis the folder containing your.x.pyfiles.dist/buildis your chosen output directory.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lilliepy_tags-1.0.0.tar.gz
(4.1 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