import components.code as code import components.docs as docs pyp | queries
PyWPR docs

basics

<py>! tag

in pywrp we have <py!> and </py!> HTML tags for embedding python server code,
(almost like in php)
for example:

code.code_comp(f"""

this is html element

{'<'}py!> # This is Python code""",'html')

echo function

e() is a function that prints text to the page
(just like echo in php)

code.code_comp(f"""{'<'}py!> e("hello word") # also you can use just regular python print print(object) # e() supports only str|int|float, but you can ignoreType=True e({'{'}'test':123{'}'},ignoreType=True) """)

<p?> tag

also there is <p?></p?> tags, they are shortcuts to echo
(like in php too)
for example:

code.code_comp(f"""{'<'}p?>"hello world"{'<'}/p?> {'<'}py!>e("hello world"){' {'<'}p?>foo(){'""",'html')