Metadata-Version: 2.4
Name: pyapp-window
Version: 2.2.3
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.8
Requires-Dist: argsense>=1.1.2
Requires-Dist: lk-utils>=3.5.2
Requires-Dist: pythonnet>=3.0.5; sys_platform == 'win32' and python_version >= '3.8' and python_version < '3.14'
Requires-Dist: pythonnet>=3.1.0rc0; sys_platform == 'win32' and python_version >= '3.14' and python_version < '3.15'
Requires-Dist: pywebview>=6.1.0; sys_platform == 'linux' and python_version >= '3.9' and python_version < '3.15'
Requires-Dist: requests>=2.32.4; python_version >= '3.8' and python_version < '3.9'
Requires-Dist: requests>=2.32.5; python_version >= '3.9'
Requires-Dist: toga<0.4.7; sys_platform != 'linux' and python_version >= '3.8' and python_version < '3.9'
Requires-Dist: toga<0.5.3,>=0.5.0; sys_platform != 'linux' and python_version >= '3.9' and python_version < '3.10'
Requires-Dist: toga>=0.5.3; sys_platform != 'linux' and python_version >= '3.10' and python_version < '3.15'
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),
)
```
