# PuePy - PyScript Frontend Framework
➡️ [Project Website](https://puepy.dev)
📝 [Project Documentation](https://docs.puepy.dev/)
PuePy is a lightweight web framework that uses WebAssembly via [PyScript](https://pyscript.net) 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](https://pyodide.org/en/stable/) or [Micropython](https://micropython.org/)
## 🐒 Try a demo app
See [ExpenseLemur.com](https://expenselemur.com) and the [Expense Lemur Github Repo](https://github.com/kkinder/expenselemur) for a demonstration of what PuePy is capable of.
## 🧑💻 See some code
```python
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](https://puepy.dev/)
- **Documentation**: [docs.puepy.dev](https://docs.puepy.dev/)
## License
PuePy is licensed under the Apache 2 license, for your coding convenience.
Raw data
{
"_id": null,
"home_page": "https://puepy.dev/",
"name": "puepy",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "pyscript, webassembly, frontend, framework, reactive",
"author": "Ken Kinder",
"author_email": "ken+github@kkinder.com",
"download_url": "https://files.pythonhosted.org/packages/69/34/9db87c5764194ba520818e98dc0d4c2f7194b230108394270770245f4088/puepy-0.4.6.tar.gz",
"platform": null,
"description": "# PuePy - PyScript Frontend Framework\n\n\u27a1\ufe0f [Project Website](https://puepy.dev)\n\ud83d\udcdd [Project Documentation](https://docs.puepy.dev/)\n\nPuePy is a lightweight web framework that uses WebAssembly via [PyScript](https://pyscript.net) 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.\n\n- Reactive data binding with component-based architecture\n- Single Page App (SPA) router included\n- No build layer: direct execution like other Python projects\n- Choice of full [Pyodide](https://pyodide.org/en/stable/) or [Micropython](https://micropython.org/)\n\n## \ud83d\udc12 Try a demo app\n\nSee [ExpenseLemur.com](https://expenselemur.com) and the [Expense Lemur Github Repo](https://github.com/kkinder/expenselemur) for a demonstration of what PuePy is capable of.\n\n## \ud83e\uddd1\u200d\ud83d\udcbb See some code\n\n```python\nfrom puepy import Page, Application, t\n\napp = Application()\n\n\n@app.page()\nclass Hello(Page):\n def initial(self):\n return dict(name=\"\")\n\n def populate(self):\n with t.div(classes=[\"container\", \"mx-auto\", \"p-4\"]):\n t.h1(\"Welcome to PyScript\", classes=[\"text-xl\", \"pb-4\"])\n if self.state[\"name\"]:\n t.p(f\"Hello there, {self.state['name']}\")\n else:\n t.p(\"Why don't you tell me your name?\")\n t.input(placeholder=\"Enter your name\", bind=\"name\")\n t.button(\"Continue\", classes=\"btn btn-lg\", on_click=self.on_button_click)\n\n def on_button_click(self, event):\n print(\"Button clicked\") # This logs to console\n\n\napp.mount(\"#app\")\n```\n\n## Learn\n\n- **Project Website**: [puepy.dev](https://puepy.dev/)\n- **Documentation**: [docs.puepy.dev](https://docs.puepy.dev/)\n\n## License\n\nPuePy is licensed under the Apache 2 license, for your coding convenience.\n\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Frontend Framework for PyScript",
"version": "0.4.6",
"project_urls": {
"Documentation": "https://docs.puepy.dev/",
"Homepage": "https://puepy.dev/",
"Repository": "https://github.com/kkinder/puepy"
},
"split_keywords": [
"pyscript",
" webassembly",
" frontend",
" framework",
" reactive"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e189e468fd11ac60a1f3de84d523ba776d76aabb9adb708974ce2c33730317a8",
"md5": "747148461f1bf427b2c59a110bd15a19",
"sha256": "5a0a1c8d2df1cfeaf94608a503aabbdb16c2942d59dbaf82e6c6dcf4df9a5f4e"
},
"downloads": -1,
"filename": "puepy-0.4.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "747148461f1bf427b2c59a110bd15a19",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 28800,
"upload_time": "2024-10-06T10:40:15",
"upload_time_iso_8601": "2024-10-06T10:40:15.450402Z",
"url": "https://files.pythonhosted.org/packages/e1/89/e468fd11ac60a1f3de84d523ba776d76aabb9adb708974ce2c33730317a8/puepy-0.4.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "69349db87c5764194ba520818e98dc0d4c2f7194b230108394270770245f4088",
"md5": "16951dcb1ed96ef64c995a63f4256f0c",
"sha256": "e11f1795d98fcd5545b338c8b0943bfaf01934a6de7c070de50007898c770a2a"
},
"downloads": -1,
"filename": "puepy-0.4.6.tar.gz",
"has_sig": false,
"md5_digest": "16951dcb1ed96ef64c995a63f4256f0c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 25825,
"upload_time": "2024-10-06T10:40:16",
"upload_time_iso_8601": "2024-10-06T10:40:16.764779Z",
"url": "https://files.pythonhosted.org/packages/69/34/9db87c5764194ba520818e98dc0d4c2f7194b230108394270770245f4088/puepy-0.4.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-06 10:40:16",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kkinder",
"github_project": "puepy",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "puepy"
}