Metadata-Version: 2.1
Name: pyapp-window
Version: 2.1.0
Summary: Launch URL with native window in WebView mode. Multiple backend implementations are supported.
Author: likianta
Author-email: likianta@foxmail.com
Requires-Python: >=3.8,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: argsense (>=0.5.8,<0.6.0)
Requires-Dist: lk-logger (>=6.0.0,<7.0.0)
Requires-Dist: lk-utils (>=3.0.0,<4.0.0)
Requires-Dist: requests
Requires-Dist: toga (>=0.4.7,<0.5.0) ; python_version < "3.9" and sys_platform == "darwin"
Requires-Dist: toga (>=0.4.7,<0.5.0) ; python_version < "3.9" and sys_platform == "win32"
Requires-Dist: toga (>=0.4.8,<0.5.0) ; python_version >= "3.9" and python_version < "3.13" and sys_platform == "darwin"
Requires-Dist: toga (>=0.4.8,<0.5.0) ; python_version >= "3.9" and python_version < "3.13" and sys_platform == "win32"
Requires-Dist: webui2 (>=2.4.5,<3.0.0) ; sys_platform == "darwin"
Requires-Dist: webui2 (>=2.4.5,<3.0.0) ; sys_platform == "linux"
Description-Content-Type: text/markdown

# PyApp Window

A general-purpose native window launcher for a given url.

## Install

```sh
pip install pyapp-window
```

## Usage

Use in terminal:

```sh
py -m pyapp_window -h
py -m pyapp_window http://localhost:3001
```

Use in script:

```py
import sys
import pyapp_window
from lk_utils import run_cmd_args

# get a popen object
port = 3001
proc = run_cmd_args(
    sys.executable, '-m', 'streamlit', 'run', your_target_script,
    '--browser.gatherUsageStats', 'false',
    '--global.developmentMode', 'false',
    '--server.headless', 'true',
    '--server.port', port,
    blocking=False,
    verbose=True,
)


pyapp_window.launch(
    'Example App',
    url=f'http://localhost:{port}',
    copilot_backend=proc,
    size=(800, 600),
)
```

