Skip to main content

No project description provided

Project description

Version Python License

Description

Pywui is a Python package wrapper for pywebview to make easy the communication between python and js

Getting started

    pip install pywui

Exampple

import webview

from pywui import command, PyWuiApp, PyWuiWindow, listener


@listener("message", inject_window=True)
def on_message(window: PyWuiWindow, message: str):
    print("Message received: {!r}".format(message))


@command(inject_window=True)
def greet(window: PyWuiWindow):
    # window.toggle_fullscreen()
    window.emit("message", "Hello from python")
    print("Hello :::", window)
    return "Hello World!"


app = PyWuiApp(
    "Main Window",
    'http://localhost:5174',
    confirm_close=True
)
main_window = app.get_main_window()
app.run(debug=True)

Stay in touch

License

PyWui is MIT licensed.

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

pywui-0.1.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

pywui-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file pywui-0.1.0.tar.gz.

File metadata

  • Download URL: pywui-0.1.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/23.4.0

File hashes

Hashes for pywui-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6a0ebfbcf31c9b012a3f298e1f6a065b1ca17c3450e513e222e0cf52b74b27dd
MD5 2508c659923eeac18ab507d36cfb5fa6
BLAKE2b-256 47756b6dd85a0ef5f40b360409a65de448791a1cc44c6b8f85f47104463531e7

See more details on using hashes here.

File details

Details for the file pywui-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pywui-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/23.4.0

File hashes

Hashes for pywui-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0059e3597acfecece54f822040ab174243b25a3ae092e544893927039ad1c91f
MD5 23d71831de570051e9ccceb4db0f9ead
BLAKE2b-256 4576a3af0bcac727814fa06bc7fa5ca514222b5ecac3ccf36c8d55061c92483a

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