Metadata-Version: 2.4
Name: pyapp-window
Version: 2.2.2
Summary: Launching URL with native window in WebView mode.
License-Expression: MIT
License-File: LICENSE
Author: Likianta
Author-email: likianta@foxmail.com
Requires-Python: >=3.8
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
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: argsense (>=1.1.1,<2.0.0)
Requires-Dist: lk-logger (>=6.0.7,<7.0.0)
Requires-Dist: lk-utils (>=3.5.2,<4.0.0)
Requires-Dist: pythonnet (>=3.0.5,<4.0.0) ; python_version >= "3.8" and python_version < "3.14" and sys_platform == "win32"
Requires-Dist: pythonnet (>=3.1.0rc0,<4.0.0) ; python_version == "3.14" and sys_platform == "win32"
Requires-Dist: pywebview (>=6.1.0,<7.0.0) ; python_version >= "3.9" and python_version < "3.15" and sys_platform == "linux"
Requires-Dist: requests (>=2.32.4,<3.0.0) ; python_version == "3.8"
Requires-Dist: requests (>=2.32.5,<3.0.0) ; python_version >= "3.9" and python_version < "4.0"
Requires-Dist: toga (<0.4.7) ; python_version == "3.8" and sys_platform != "linux"
Requires-Dist: toga (>=0.5.0,<0.5.3) ; python_version == "3.9" and sys_platform != "linux"
Requires-Dist: toga (>=0.5.3,<0.6.0) ; python_version >= "3.10" and python_version < "3.15" and sys_platform != "linux"
Project-URL: Homepage, https://github.com/likianta/pyapp-window
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),
)
```

