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-0.0.1.tar.gz (3.9 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-0.0.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lilliepy_tags-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7fef98341d3f746f7ea095584c36c03f2baebbbf55db4c480aaf94fe28967c36
MD5 6e6e88adab200aa3687ce84f13948993
BLAKE2b-256 7c59c48ca4fc974a4e1abe95ac5f2729029b6868b9d333198ce4dccc941821da

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lilliepy_tags-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.1 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-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e1ed3dbf83ec961e74d02f72076e120aae5b3774aa050bb3b425e0b62baba191
MD5 b9753ea92bcd7ea4a4d63b22cfc06a41
BLAKE2b-256 80f8a7e04c61aa58ea54d9d17163eaebd629a450ebcc48522556aba66b385b09

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