Skip to main content

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 @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)

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")
  • src is the folder containing your .x.py files.
  • dist/build is your chosen output directory.

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

lilliepy_tags-1.0.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lilliepy_tags-1.0.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file lilliepy_tags-1.0.0.tar.gz.

File metadata

  • Download URL: lilliepy_tags-1.0.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for lilliepy_tags-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b84c1f72072b5ff71c0f63bfc5b8e36294cd2564849da037c1c6c7eaed6690b8
MD5 d2ba5d7abd11e00c20a59ec5b8778667
BLAKE2b-256 39c4d01b52713830cae8971ae507c22fb25add58dad5f4d3c96aebb2b3e7bca8

See more details on using hashes here.

File details

Details for the file lilliepy_tags-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: lilliepy_tags-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for lilliepy_tags-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b721890c44cc3a09a09181e5abca70658a2523bd21a16200ac7c1b3e3ef61308
MD5 7277dec83fed05152e6fd664001f060a
BLAKE2b-256 f64eab75e688b1957ecc89ebaaf3e7715d9eb02aa6fc8ed6a40169182bcd8058

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page