Skip to main content

Lackey3

Pure-Python 3 Sikuli Automation Suite & Modern IDE

Lackey3 Logo

Python 3.9+ License: MIT Pure Python

Developed by Jon Winsley and TecHaonical


Introduction

Lackey3 is a modernized, pure-Python 3 implementation of the SikuliX script automation API. It enables you to run scripts developed in SikuliX without requiring a Java Runtime Environment (JVM).

Lackey3 combines computer vision (OpenCV template matching), Optical Character Recognition (Tesseract OCR), low-level OS input emulation (mouse clicks, keyboard strokes), and application lifecycle management to provide seamless desktop graphical automation across Windows and macOS.

Key Python 3 Upgrades & Modern Features

  • Native Python 3 Architecture: Fully rewritten and optimized for Python 3 (supporting Python 3.9 through Python 3.14+). Deprecated Python 2 legacy code has been completely removed.
  • Type Annotations (PEP 561 / py.typed): Modern typing support for enhanced IDE autocompletion, static type checking with Mypy, and Pyright integration.
  • Modern Lackey Studio IDE: PySide6 (Qt6)-based modern IDE replacing the legacy SikuliX Java IDE, featuring VSCode-like autocompletion (Jedi), real-time i18n (繁體中文, English, 简体中文, 日本語), a visual snipping tool, and an exhaustive interactive command guide.
  • Packaged CLI Tool: Directly run lackey_studio from your terminal after pip install.
  • Advanced Computer Vision: Multi-scale template matching via OpenCV (PyramidTemplateMatcher), similarity thresholds, and target offsets.
  • Multilingual OCR Engine: Powered by pytesseract supporting English, Traditional Chinese (chi_tra), Simplified Chinese (chi_sim), Japanese (jpn), and more.
  • Full Unicode & Special Input Support: Robust handling of CJK text, full-width punctuation, Emoji pasting, and macro-safe text operations without unintended hotkey triggers.

Installation

Install the latest version of Lackey3 via pip:

pip install Lackey3

System Requirements

  • Python: Python 3.9 or higher (tested up to Python 3.14).
  • Operating Systems:
    • Windows 10 / 11 / Server (x64)
    • macOS (Intel & Apple Silicon)
  • Optional - Tesseract OCR: For OCR features (findText(), text(), waitText()), install Tesseract OCR (v3.05+) and ensure it is available in your system PATH:

Lackey Studio IDE

Lackey3 comes bundled with Lackey Studio, a full-featured desktop IDE:

  • Visual Snipping Tool: Dim the screen, drag to select any region, automatically save the cropped template image, and insert Pattern("image.png").similar(0.85) directly into your code.
  • Intelligent IntelliSense: Real-time code completions and docstrings powered by Jedi, connected directly to your active Python environment.
  • Multi-Language Internationalization (i18n): Switch on-the-fly between 繁體中文, English, 简体中文, and 日本語.
  • Interactive Command Inspector: Detailed parameter explanations, return values, and one-click copyable realistic code examples for all Sikuli / Lackey commands.
  • Sikuli Bundle Management: Open and save SikuliX .sikuli folders with automatic image migration and relative path rewriting.

Launching the IDE

After installation, launch Lackey Studio in any of the following ways:

# 1. Direct CLI entry point
lackey_studio

# 2. Python module runner
python -m lackey_studio

Or from within a Python script / interactive shell:

import lackey3
lackey3.studio()

Quick Start & Usage

1. Basic Sikuli-Compatible Automation

Lackey maps Sikuli functions (click, find, wait, type, etc.) into the global scope:

from lackey3 import *

# Open native application
App("notepad.exe").open()
wait(2.0)

# Type text into active window
type("Hello, Lackey3 on Python 3!\n")

# Unicode & Chinese support via paste
paste("繁體中文與 Emoji 🚀 支援!\n")

# Mouse interaction and image searching
if exists("save_icon.png"):
    click("save_icon.png")

2. Optical Character Recognition (OCR)

Recognize and click text on screen without requiring pre-captured image templates:

from lackey3 import *

screen = Screen()

# Extract all text visible on screen
content = screen.text()
print("Screen Text:", content)

# Search for specific text on screen and click it
target_match = screen.findText("Save")
if target_match:
    target_match.click()

3. Application Lifecycle Management

from lackey3 import App

app = App("notepad.exe").open(waitTime=2.0)
print(f"Notepad PID: {app.getPID()}, IsRunning: {app.isRunning()}")

win = app.waitForWindow(seconds=5.0)
if win:
    print(f"Window bounds: ({win.getX()}, {win.getY()}, {win.getW()}, {win.getH()})")
    app.focus()

# Close application gracefully
app.close()

Sikuli Function Remapping (Python Built-in Aliases)

Because Sikuli defines global functions type() and input(), importing Lackey via from lackey3 import * remaps standard Python built-ins to avoid collisions:

  • Native Python type() is available as type_()
  • Native Python input() is available as input_()
  • Native Python sys.exit() is available as exit_()
from lackey3 import *

# Sikuli keystroke emulation:
type("Hello World")

# Native Python type checking:
var_type = type_(123)  # <class 'int'>

# Native Python console prompt:
user_val = input_("Enter value: ")

Development & Testing with Pixi

We use pixi to maintain reproducible, isolated developer environments.

# Run headless unit tests
pixi run test

# Run Lackey Studio IDE tests
pixi run test-studio

# Run end-to-end 40-step Notepad super automation test
pixi run test-notepad

# Run legacy integration test suites
pixi run test-all

# Launch Lackey Studio IDE
pixi run studio

# Build sdist and wheel distributions
pixi run build

# Validate distribution files
pixi run check

Contributing & License

Contributions, issues, and feature requests are welcome! Please feel free to check the issues page or submit pull requests.

This project is licensed under the terms of the MIT License. See LICENSE.md for full license text.

Metadata

Release files for Lackey3 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Lackey3 1.0.1
File Size Uploaded
lackey3-1.0.1.tar.gz 338.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Lackey3 1.0.1
File Interpreter ABI Platform
lackey3-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 676.6 kB

Release files / lackey3-1.0.1.tar.gz

Download URL lackey3-1.0.1.tar.gz
Size 338.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9370afe9cb411095c77603471398913d1dca7695c0ca37453fa3c30674a8bf7a
BLAKE2b-256 checksum
How to use checksums
bc0190aeafa97b3ef1be7d6047077b125b8032ebe6c888528a10b8e9e08d81fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / lackey3-1.0.1-py3-none-any.whl

Download URL lackey3-1.0.1-py3-none-any.whl
Size 338.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
324878ef602e16be5a15cf46ad23438826a7bd45e42966cf127a53daf8e79eb8
BLAKE2b-256 checksum
How to use checksums
62a2d0d62c72344d106dfb51fb6b38c59ceb191b97733ea708e2fb7b8e468989
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page