Metadata-Version: 2.4
Name: pyautogui-rust
Version: 0.9.54.1
Summary: Cross-platform GUI automation with an optional Rust-accelerated Windows backend
Author-email: Al Sweigart <al@inventwithpython.com>
Maintainer: zhai
License-Expression: BSD-3-Clause
Project-URL: Documentation, https://pyautogui.readthedocs.io/
Project-URL: Issues, https://github.com/zhai/pyautogui/issues
Project-URL: Repository, https://github.com/zhai/pyautogui
Keywords: automation,gui,keyboard,mouse,rust,testing,windows
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: MacOS X
Classifier: Environment :: Win32 (MS Windows)
Classifier: Environment :: X11 Applications
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
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
Classifier: Programming Language :: Rust
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: mouseinfo>=0.1.3
Requires-Dist: pillow>=9.3
Requires-Dist: pygetwindow>=0.0.5
Requires-Dist: pymsgbox>=1.0.9
Requires-Dist: pyscreeze>=0.1.21
Requires-Dist: pytweening>=1.0.4
Requires-Dist: pyobjc-core; platform_system == "Darwin"
Requires-Dist: pyobjc-framework-Quartz; platform_system == "Darwin"
Requires-Dist: python3-Xlib; platform_system == "Linux"
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: pytest>=8.3; extra == "dev"
Requires-Dist: pytest-cov>=6; extra == "dev"
Requires-Dist: ruff>=0.9; extra == "dev"
Provides-Extra: benchmark
Requires-Dist: pytest-benchmark>=5; extra == "benchmark"
Provides-Extra: vision
Requires-Dist: mss>=9; extra == "vision"
Requires-Dist: numpy>=1.24; extra == "vision"
Requires-Dist: opencv-python>=4.8; extra == "vision"
Dynamic: license-file

# Rust-accelerated PyAutoGUI 0.9.54

This fork preserves the established PyAutoGUI 0.9.54 API while adding an optional user-mode Rust fast path on Windows.

```python
import pyautogui

pyautogui.moveTo(500, 300, duration=0.2)
pyautogui.click()
pyautogui.write("hello", interval=0.03)
image = pyautogui.screenshot(region=(0, 0, 800, 600))
box = pyautogui.locateOnScreen("button.png", confidence=0.9)
```

No Rust-specific import or new calling convention is required. If the extension is absent or one native operation fails, that operation silently returns to the original Win32 ctypes or PyScreeze implementation.

## Windows fast paths

- Batched `SendInput` keyboard and mouse events
- Virtual-desktop coordinates and negative monitor origins
- Per-monitor V2 DPI awareness
- Reusable `CreateDIBSection` GDI capture contexts
- Parallel hierarchical grayscale SAD template matching
- Deadline-based smooth movement with scoped 1 ms timer resolution
- Low-level failsafe monitoring
- GIL release around native capture, matching, input, and movement

The project contains no kernel driver, service, test-signing workflow, or special boot requirement.

## Universal visual location

Still images, GIF representative frames, DPI/zoom variants, and moving targets
share an adaptive locate pipeline. Large or highly changed references can use
the external 359k-parameter TinyLocate network. Its framework-free CUDA runtime
is compiled into the Rust extension; the 721 KiB model remains a separate file.
High-confidence neural hits contribute a small, bounded in-memory appearance
bank, so a moving or animated target can adapt without writing captures to disk.

```powershell
python tools/install_tinylocate_model.py path\to\tinylocate-v1.tln
python tools/smoke_tinylocate_runtime.py path\to\tinylocate-v1.tln
```

Existing calls stay unchanged:

```python
box = pyautogui.locateOnScreen("target.png", confidence=0.8)
boxes = list(pyautogui.locateAllOnScreen("target.gif", confidence=0.8))
```

Model training uses PyTorch only in the development environment and exports the
custom TLN1 FP16 container. Runtime loads neither PyTorch nor an ONNX engine.
See [PRODUCT_VISION.md](PRODUCT_VISION.md) for routing, accuracy, and latency gates.

## Requirements

- Python 3.9+
- Windows wheels use CPython ABI3
- Building from source on Windows requires stable Rust, MSVC Build Tools, and a Windows SDK

Optional vision dependencies are available with:

```powershell
python -m pip install -e ".[vision]"
```

## Build and test

```powershell
python -m pip install -e ".[dev,benchmark]"
python tools/check.py --build
```

The default test suite is hermetic and does not emit operating-system input. See [DEVELOPING.md](DEVELOPING.md) for architecture, benchmarks, CI, and release checks.

Upstream PyAutoGUI documentation remains applicable to the public API: https://pyautogui.readthedocs.io/
