--- id: pywinbox version: "0.7" license: BSD 3 license_treatment: permissive maintenance: active --- # PyWinBox — Cross-Platform and multi-monitor toolkit to handle rectangular areas and windows box License: permissive · Maintenance: active · Downloads: 199.6K/mo ## What it is and what it does PyWinBox is a cross-platform library for querying and manipulating window geometry—position, size, and derived properties like center, corners, and midpoints. It abstracts the differences between Windows (via pywin32), macOS (via pyobjc), and Linux (via python-xlib and ewmhlib), letting you read and set window bounds using a uniform API. You instantiate a PyWinBox object with a window handle (in the appropriate format for your OS) and optional callback functions. The library then exposes properties like left, top, right, bottom, width, height, center, topleft, bottomright, and others, plus utility structs (Box, Rect, Size, Point) for cleaner data handling. You can use default callbacks to move and resize windows automatically, or provide custom callbacks to integrate with your own window management logic. Use it for: - Programmatically position and resize application windows on multi-monitor setups. - Track or enforce window geometry constraints in a cross-platform desktop tool. - Build custom window tiling or layout managers that work on Windows, macOS, and Linux. - Retrieve current window bounds for logging, testing, or UI automation workflows. - Manage rectangular areas with custom data backends by providing your own callbacks. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. PyWinBox manages window positions, sizes, and rectangular areas across Windows, macOS, and Linux, exposing properties like left, top, width, height, center, and corner coordinates. Yes, if you need cross-platform window geometry control. The library is actively maintained, has low install friction, and covers all three major desktop OSes. The permissive BSD license poses no barrier. Start with the default callbacks for simple use cases; define custom ones only if you need to integrate with existing window management. No known vulnerabilities. ## Install pip install pywinbox uv add pywinbox poetry add pywinbox ## Installing PyWinBox Before you install: Low install friction with a pure-Python wheel. Maintenance is active with a recent commit on 2026-07-15. The package depends on platform-specific libraries (pywin32 for Windows, pyobjc for macOS, python-xlib and ewmhlib for Linux), which install cleanly but tie you to those ecosystems. License in practice: BSD 3 is a permissive license, so you can use this in commercial and private projects with minimal restrictions—just include the license text. Quickstart: pip install pywinbox import pywinbox # For a window handle (platform-specific format) myBox = pywinbox.PyWinBox(onQuery=None, onSet=None, handle=windowHandle) print(myBox.left, myBox.top, myBox.width, myBox.height) Requires platform-specific window handle: integer/string on Windows, integer/X-Window on Linux, or NSWindow/app+title tuple on macOS. Verify before relying: - Whether the package works reliably with all three platforms or if some have better support than others. - Performance characteristics when managing many windows or frequent property updates. - Compatibility with modern versions of pywin32, pyobjc, and python-xlib. ## Package facts - License: BSD 3 (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 199.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags cross-platform window positioning, get set window size position, rectangular area management, multi-monitor window control, window geometry properties, window-management, cross-platform, desktop-automation [View on SkillFed](https://skillfed.io/packages/pywinbox) · [View on PyPI](https://pypi.org/project/pywinbox/)