# A reactive web framework for Python built on PyScript

**URL:** https://discuss.python.org/t/a-reactive-web-framework-for-python-built-on-pyscript/59519
**Category:** WebAssembly
**Created:** [July 30, 2024, 10:20am UTC](https://discuss.python.org/t/a-reactive-web-framework-for-python-built-on-pyscript/59519 "2024-07-30T10:20:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![bouncing](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/bouncing/32/21256_2.png) [@bouncing](https://discuss.python.org/u/bouncing)
#### Post date: [July 30, 2024, 10:20am UTC](https://discuss.python.org/t/a-reactive-web-framework-for-python-built-on-pyscript/59519/1 "2024-07-30T10:20:27Z")

</div>

Hello everyone. I hope I’m announcing this in the right place. If anyone is interested in a “pure Python” frontend framework for the web, I took PyScript and built a reactive framework on top of it called [PuePy](https://puepy.dev). It’s inspired by Vue.js, where you make pages and components with reactive data that causes the page to update as needed. Eg,

```python
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

```

That creates a page with a counter and two buttons (that’s the example on puepy.dev).

I’ve put a fair amount of work into it, and am now trying to get any feedback on what I’ve done, so if it piques your interest, give it a try and let me know.

Cheers!

-Ken
