Skip to main content

Frontend Framework for PyScript

Project description

PuePy — PyScript Frontend Framework

➡️ https://puepy.dev

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

License

PuePy is licensed under the Apache 2 license, for your coding convenience.

Project details


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.7.tar.gz (25.4 kB view details)

Uploaded Source

Built Distribution

puepy-0.3.7-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

Details for the file puepy-0.3.7.tar.gz.

File metadata

  • Download URL: puepy-0.3.7.tar.gz
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for puepy-0.3.7.tar.gz
Algorithm Hash digest
SHA256 6558400b549cae5eeb8c7d6b3e3e6db62196120cc007f865f7195bbfb5d7862e
MD5 93f57eb565e15eac29d5b9b0285fbc65
BLAKE2b-256 2af6af0025afb1923cd8f16ac104a8217ab24c2f278358e318b02d9ac4aa4089

See more details on using hashes here.

File details

Details for the file puepy-0.3.7-py3-none-any.whl.

File metadata

  • Download URL: puepy-0.3.7-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

Hashes for puepy-0.3.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a8bb9250521a32aca3743a6bcdea645b92e17f722588b9a4fdc7a21a19b81e54
MD5 989d7962714d90a19bb91aa5d77882c8
BLAKE2b-256 fc29354d51eee9f14dca0752dab01bd3addec7d3578eb7d6a7d70da45949955a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page