Skip to main content

Version Python License

Description

Pywui is a Python package wrapper for pywebview to make easy the communication between python and JS and async support.

Getting started

    pip install pywui_cli

Create new project

    pywui new my_projet

Example

import asyncio
from datetime import datetime

from pywui import command, PyWuiApp, PyWuiWindow, listener, with_window


@with_window
@listener("message", )
async def on_message(window: PyWuiWindow, message: str):
    print("Message received: {}".format(message))


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


async def on_start(window: PyWuiWindow):
    async def send_time():
        while True:
            window.emit("time", datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
            await asyncio.sleep(1)

    await asyncio.create_task(send_time())


app = PyWuiApp()
main_window = app.get_window("main")
app.run(func=on_start, args=[main_window], debug=True)

Stay in touch

License

PyWui is MIT licensed.

Metadata

Release files for pywui 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pywui 0.1.7
File Size Uploaded Provenance Actions
pywui-0.1.7.tar.gz 249.8 kB Without provenance Details for pywui-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pywui 0.1.7
File Interpreter ABI Platform Actions
pywui-0.1.7-py3-none-any.whl Python 3 none any Details for pywui-0.1.7-py3-none-any.whl

Total release size: 499.2 kB

Release files / pywui-0.1.7.tar.gz

Download URL pywui-0.1.7.tar.gz
Size 249.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9f08a5404c6e02f589f76b1e486342658cdec5f7cb367a8e5b1055a8e73405fd
BLAKE2b-256 checksum
How to use checksums
22122b67f8a0a1917abe1205bf66d328627e9d542f08f8ccfd17a67c01ddf68d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.4 Darwin/23.4.0

Release files / pywui-0.1.7-py3-none-any.whl

Download URL pywui-0.1.7-py3-none-any.whl
Size 249.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
07be9defadcfc6d0370a1e0be32826a061083e9e8d328464b9c1ef9592828078
BLAKE2b-256 checksum
How to use checksums
acf7e1a70059fcad0489c2db6045ce2d76c5f14d09c4e0cb34c0e699a4f4585c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.4 Darwin/23.4.0

Security for pywui 0.1.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page