PuePy - Python Frontend Framework

1 min read Original article ↗

Welcome to PuePy!

A pure Python frontend web framework with reactivity, routing, and all the batteries of Python! See those plus/minus buttons right there? Those are running Python code, right in your browser. No transpiling, no build step, no funny business.

							class CounterPage(Page):
    def initial(self):
        return {"current_value": 0}

    def populate(self):
        with t.div(classes="inc-box"):
            t.button("-", on_click=self.on_decr)
            t.span(str(self.state["current_value"]))
            t.button("+", on_click=self.on_incr)

    def on_decr(self, event):
        self.state["current_value"] -= 1

    def on_incr(self, event):
        self.state["current_value"] += 1