compiles reactpy components into html string
Project description
Reactpy Html String Compiler
compiles ReactPy Components into a HTML String
Why would you use this?
you could use the converted html string in flask or other templating engines
How to use this?
this module has only 1 function, compiler(component : Reactpy.Types.Component) -> str, which takes in a reactpy component and returns a string
from reactpy import component, html
from reactpy_html_string_compiler import compiler
from flask import Flask # or any other backend
@component
def header():
return html.h1("Hello, World", {"id": "header"})
# utilizing component
app = Flask(__name__)
@app.route("/")
def index():
return compiler(header()) # -> <h1 id="header">Hello, World</h1>
app.run('0.0.0.0', 3000)
dependencies
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
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
File details
Details for the file reactpy_html_string_compiler-0.1.0.tar.gz.
File metadata
- Download URL: reactpy_html_string_compiler-0.1.0.tar.gz
- Upload date:
- Size: 1.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54d2ca0590e65bf0f660fa346eeec5cef21692dd01348c0d9c3a69c086ddd639
|
|
| MD5 |
29583c44dcfa5d916c2c88d8171570d1
|
|
| BLAKE2b-256 |
24ab3d3d5cbff4a3c62253e38a1b84aa0bbb87837f6a7352adba1edf7560c789
|
File details
Details for the file reactpy_html_string_compiler-0.1.0-py3-none-any.whl.
File metadata
- Download URL: reactpy_html_string_compiler-0.1.0-py3-none-any.whl
- Upload date:
- Size: 1.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77126db8470ef7ddc3acd662c703f61b98a268a8708070b2fd04d2b4999f7045
|
|
| MD5 |
3b1435c350ef03a5fb0b9fd7579707cb
|
|
| BLAKE2b-256 |
16415126e87c4703a605b8cec7be3cee6d48d2759cb0ae17a585ef0bcac55a2d
|