PuePy is a lightweight web framework that uses Webassembly via PyScript to put Python right in your browser with all the modern conveniences of a web framework, but none of the headaches of Webpack, NPM, or even JavaScript.
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
PuePy is a lightweight web framework that uses Webassembly via PyScript to put Python right in your browser with all the modern conveniences of a web framework, but none of the headaches of Webpack, NPM, or even JavaScript.
Not all sites need "web frameworks." Does yours? And if it does, will you miss in-browser debuggers, mature JavaScript tooling, and the vast communities around frameworks like React or Vue? You might.
Ready to dive in? Check out our tutorial and see how easy it is to build your first project with PuePy.
DocumentationYou are not the only one looking for a Pure Python development stack. There might be dozens of us!
PuePy on GitHub