Metadata-Version: 2.5
Name: pyapp-window
Version: 2.2.4
Summary: Launching URL with native window in WebView mode.
Project-URL: homepage, https://github.com/likianta/pyapp-window
Author-email: Likianta <likianta@foxmail.com>
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: argsense>=1.1.2
Requires-Dist: lk-utils>=3.8.1
Requires-Dist: pythonnet>=3.2.0rc0
Requires-Dist: pywebview>=6.2.1; sys_platform == 'linux' and python_version >= '3.9' and python_version < '3.15'
Requires-Dist: toga>=0.5.6; 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),
)
```
