91e75e620b
CI: cua-driver distro-compat matrix / debian:12 (glibc 2.36) (push) Has been cancelled
CI: SPDX Headers / Check SPDX headers (warn-only) (push) Has been cancelled
CD: Docs MCP Server / build (linux/amd64) (push) Has been cancelled
CD: Docs MCP Server / build (linux/arm64) (push) Has been cancelled
CD: Docs MCP Server / merge (push) Has been cancelled
CI: cua-driver distro-compat matrix / Resolve release version (push) Has been cancelled
CI: cua-driver distro-compat matrix / fedora:41 (glibc 2.40) (push) Has been cancelled
CI: cua-driver distro-compat matrix / rockylinux:9 (glibc 2.34) (push) Has been cancelled
CI: cua-driver distro-compat matrix / ubuntu:22.04 (glibc 2.35) (push) Has been cancelled
CI: cua-driver distro-compat matrix / ubuntu:24.04 (glibc 2.39) (push) Has been cancelled
CI: cua-driver distro-compat matrix / Distro compat summary (push) Has been cancelled
CI: Rust Linux unit / Rust Linux unit and compile (push) Has been cancelled
CI: Rust Windows unit / Rust Windows unit and compile (push) Has been cancelled
CI: Nix Linux Rust source / Nix / compositor build (push) Has been cancelled
CI: Nix Linux Rust source / Nix / driver package (push) Has been cancelled
CI: Nix Linux Rust source / Nix / Rust unit tests (push) Has been cancelled
35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
"""cua-auto — cross-platform automation library.
|
|
|
|
Provides a synchronous, pyautogui-style API for mouse, keyboard, screen,
|
|
window, clipboard, and shell operations.
|
|
|
|
Usage::
|
|
|
|
import cua_auto.mouse as mouse
|
|
import cua_auto.keyboard as keyboard
|
|
import cua_auto.screen as screen
|
|
import cua_auto.window as window
|
|
import cua_auto.clipboard as clipboard
|
|
import cua_auto.shell as shell
|
|
|
|
mouse.click(100, 200)
|
|
keyboard.hotkey(["ctrl", "c"])
|
|
img = screen.screenshot()
|
|
title = window.get_active_window_title()
|
|
"""
|
|
|
|
__version__ = "0.1.2"
|
|
|
|
# terminal and shell have no display dependency — always safe to import.
|
|
from cua_auto import shell, terminal
|
|
|
|
# These modules require a display server (pynput, PIL, pywinctl, pyperclip).
|
|
# Guard them so that headless environments (CI without X, computer-server inside
|
|
# a container) can still import cua_auto.terminal / cua_auto.shell without error.
|
|
try:
|
|
from cua_auto import clipboard, keyboard, mouse, screen, window
|
|
except ImportError:
|
|
pass
|
|
|
|
__all__ = ["mouse", "keyboard", "screen", "window", "clipboard", "shell", "terminal"]
|