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.4.0.tar.gz
(25.4 kB
view details)
Built Distribution
puepy-0.4.0-py3-none-any.whl
(28.3 kB
view details)
File details
Details for the file puepy-0.4.0.tar.gz
.
File metadata
- Download URL: puepy-0.4.0.tar.gz
- Upload date:
- Size: 25.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 583d48369199a5a22195c2259821eed85b7a7eae55f218151e58b363db6365bd |
|
MD5 | 7da6e7ccc8faf02d67d0b9fcab3a4eec |
|
BLAKE2b-256 | b244c7f496496fe7455dcb2f5ed0a3c9f4a7a9ca9a353a45ce1ae480d29ed52a |
File details
Details for the file puepy-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: puepy-0.4.0-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.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2571111f73fe71e5dcfab47edd114492d467f9ce6696c0d94331368432b739e1 |
|
MD5 | bb657ecfcc6a537acd03bd8f6b2663b7 |
|
BLAKE2b-256 | 788fd0f79f3c64c9ddbe8fd49028438a102b134cf5b01908e91fb17a5aec868b |