Frontend Framework for PyScript
Project description
PuePy - PyScript Frontend Framework
➡️ Project Website 📝 Project Documentation
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 (SPA) 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 Repo 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"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.1.tar.gz
(25.4 kB
view details)
Built Distribution
puepy-0.4.1-py3-none-any.whl
(28.4 kB
view details)
File details
Details for the file puepy-0.4.1.tar.gz
.
File metadata
- Download URL: puepy-0.4.1.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 | 99fb98860971da82def982a8c8aae0b6baaaa3b4bdf85f73d330a779a6944b9f |
|
MD5 | 5e6679046c5c66ef23128a5e897700cc |
|
BLAKE2b-256 | 46af64241a3ca117f62b1f20dda0ad554fa3fedf9ab6660a48dff123bdee5099 |
File details
Details for the file puepy-0.4.1-py3-none-any.whl
.
File metadata
- Download URL: puepy-0.4.1-py3-none-any.whl
- Upload date:
- Size: 28.4 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 | c71e6bcc01da6d83ff2ca5700ec40d3f351053875b2dc93e0520e5cadfa9e893 |
|
MD5 | 4fd44c45ebb17ffd8c3eb06332b239e2 |
|
BLAKE2b-256 | 8c34092e42b0d6cd4896a564491df84e486d17818840f14c93590f539026c8cc |