puepy


Namepuepy JSON
Version 0.6.5 PyPI version JSON
download
home_pagehttps://puepy.dev/
SummaryFrontend Framework for PyScript
upload_time2025-02-22 11:50:08
maintainerNone
docs_urlNone
authorKen Kinder
requires_python<4.0,>=3.9
licenseApache-2.0
keywords pyscript webassembly frontend framework reactive
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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/60/84/f9184dae016504a81c9055d7e0bfa84bf6e731d6ca45b9a9f06178f972bf/puepy-0.6.5.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.6.5",
    "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": null,
            "digests": {
                "blake2b_256": "759d95bd54b735f887ba778b0ad0ebd8356df7791b2129c65c5a85f39892e521",
                "md5": "d52a8d64346e655e587d1a3e5199272a",
                "sha256": "d41e19193b39c01d4af87656bd3335bdcf23c48c4b6f79e0f3c50b6581e7f711"
            },
            "downloads": -1,
            "filename": "puepy-0.6.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d52a8d64346e655e587d1a3e5199272a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 28791,
            "upload_time": "2025-02-22T11:50:06",
            "upload_time_iso_8601": "2025-02-22T11:50:06.058295Z",
            "url": "https://files.pythonhosted.org/packages/75/9d/95bd54b735f887ba778b0ad0ebd8356df7791b2129c65c5a85f39892e521/puepy-0.6.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6084f9184dae016504a81c9055d7e0bfa84bf6e731d6ca45b9a9f06178f972bf",
                "md5": "8c1cb0a425fea48ccb2bfec0dc7a30b4",
                "sha256": "5145fc9d7a7b7762327979d31d9a16a9dbb2389a5092ac78db45935d9b92f5bf"
            },
            "downloads": -1,
            "filename": "puepy-0.6.5.tar.gz",
            "has_sig": false,
            "md5_digest": "8c1cb0a425fea48ccb2bfec0dc7a30b4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 26040,
            "upload_time": "2025-02-22T11:50:08",
            "upload_time_iso_8601": "2025-02-22T11:50:08.607756Z",
            "url": "https://files.pythonhosted.org/packages/60/84/f9184dae016504a81c9055d7e0bfa84bf6e731d6ca45b9a9f06178f972bf/puepy-0.6.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-22 11:50:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kkinder",
    "github_project": "puepy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "puepy"
}
        
Elapsed time: 0.96858s