Skip to main content

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

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

Uploaded Source

Built Distribution

puepy-0.6.5-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: puepy-0.6.5.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for puepy-0.6.5.tar.gz
Algorithm Hash digest
SHA256 5145fc9d7a7b7762327979d31d9a16a9dbb2389a5092ac78db45935d9b92f5bf
MD5 8c1cb0a425fea48ccb2bfec0dc7a30b4
BLAKE2b-256 6084f9184dae016504a81c9055d7e0bfa84bf6e731d6ca45b9a9f06178f972bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for puepy-0.6.5.tar.gz:

Publisher: python-publish.yml on kkinder/puepy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: puepy-0.6.5-py3-none-any.whl
  • Upload date:
  • Size: 28.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for puepy-0.6.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d41e19193b39c01d4af87656bd3335bdcf23c48c4b6f79e0f3c50b6581e7f711
MD5 d52a8d64346e655e587d1a3e5199272a
BLAKE2b-256 759d95bd54b735f887ba778b0ad0ebd8356df7791b2129c65c5a85f39892e521

See more details on using hashes here.

Provenance

The following attestation bundles were made for puepy-0.6.5-py3-none-any.whl:

Publisher: python-publish.yml on kkinder/puepy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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