Pywui is a Python package wrapper for pywebview to make easy the communication between python and JS
Project description
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
- Author - Tsiresy Mila
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.1.tar.gz
(5.6 kB
view details)
Built Distribution
pywui-0.1.1-py3-none-any.whl
(7.3 kB
view details)
File details
Details for the file pywui-0.1.1.tar.gz
.
File metadata
- Download URL: pywui-0.1.1.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cd61e07e6bb468bf22c2bd709546169045b391f8c4f63b6ad2e75cf0739432b |
|
MD5 | 37ad8d111697e9134fbc50d301e543c5 |
|
BLAKE2b-256 | 246b5bb428f30599427f9bf41106462682300e1d30a354e1c5b7a53587fc0a9c |
File details
Details for the file pywui-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pywui-0.1.1-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dfb8c8ef5b7f56389eb351efad21bdad4582a1b0a0421f432fda72c86474c10 |
|
MD5 | 8ca7a083a8b5fc1f5f55b0004fb0daa1 |
|
BLAKE2b-256 | ceddabcad8cb96d4af6df5000b3c9a053c71f986dcdac64119ced2d0ebfc9cae |