Let's create a file example.py
# coding: mixt from mixt import html, Element, Required class Hello(Element): class PropTypes: name: Required[str] def render(self, context): return <div>Hello, {self.name}</div> print(<Hello name="World"/>)
And execute it:
$ python example.py <div>Hello, World</div>
If you don't like to write html in python, you can still use it:
from mixt import html, Element, Required class Hello(Element): class PropTypes: name: Required[str] def render(self, context): return html.Div()("Hello, ", self.name) print(Hello(name="World"))