Frontend Framework for PyScript
Project description
PuePy — PyScript Frontend Framework
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.
- Reactive data binding with Component-based architecture
- Single Page App router included
- No build layer: direct execution like other Python projects
- Choice of full Pyodide or Micropython
🐒 Try a demo app
See ExpenseLemur.com and the Expense Lemur Github Rep for a demonstration of what PuePy is capable of.
🧑💻 See some code
from puepy import Page, Application, t
app = Application()
@app.page()
class Hello(Page):
def initial(self):
return dict(name="")
def populate(self):
with t.div(classes=["container", "mx-auto", "p-4"]):
t.h1("Welcome to PyScript", classes=["text-xl", "pb-4"])
if self.state["name"]:
t.p(f"Why hello there, {self.state['name']}")
else:
t.p("Why don't you tell me your name?")
t.input(placeholder="Enter your name", bind="name")
t.button("Continue", classes="btn btn-lg", on_click=self.on_button_click)
def on_button_click(self, event):
print("Button clicked") # This logs to console
app.mount("#app")
Learn
- Project Website: puepy.dev
- Documentation: docs.puepy.dev
License
PuePy is licensed under the Apache 2 license, for your coding convenience.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
puepy-0.3.6.tar.gz
(25.2 kB
view details)
Built Distribution
puepy-0.3.6-py3-none-any.whl
(28.3 kB
view details)
File details
Details for the file puepy-0.3.6.tar.gz
.
File metadata
- Download URL: puepy-0.3.6.tar.gz
- Upload date:
- Size: 25.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df553f5b54545919cf398286d2cabecdc686bd0a6ca58e92e839413d65a3db5c |
|
MD5 | baaaa36bfb6bc4968d017e5c0b29b089 |
|
BLAKE2b-256 | fcd2ed4d28b357687e7e4a8350e51b92e7993b4df906fc383464a2d7c9ba4da1 |
File details
Details for the file puepy-0.3.6-py3-none-any.whl
.
File metadata
- Download URL: puepy-0.3.6-py3-none-any.whl
- Upload date:
- Size: 28.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f520713928f4fe1aef5c58d31d3ccbb36146300ba45adb8d063d235fda253af |
|
MD5 | 94c2150fadee6b3e8dc5019eea1a1031 |
|
BLAKE2b-256 | aef02fcf09d87f4cdfa30c2063a079102a558d8a52e59790506abc105a15d706 |