--- id: pyrect version: "0.2.0" license: BSD license_treatment: permissive maintenance: dormant --- # PyRect — PyRect is a simple module with a Rect class for Pygame-like rectangular areas. License: permissive · Maintenance: dormant · Downloads: 2.9M/mo ## What it is and what it does PyRect is a lightweight, standalone implementation of a rectangular area class modeled after Pygame's Rect. It lets you create rectangles by specifying top-left corner coordinates, width, and height, then read and modify a rich set of derived attributes—edges (top, left, bottom, right), corners (topleft, topright, etc.), center points, and dimensions—with automatic recalculation of dependent values whenever you change one. The package supports both integer and floating-point coordinates (via an enableFloat flag) and maintains compatibility across Python 2 and 3. You would use PyRect when you need geometric rectangle operations without importing the full Pygame library—for example, in game logic, UI layout, collision detection, or any code that manipulates rectangular regions. It has no external dependencies and is designed as a drop-in alternative for projects that don't need the rest of Pygame. Use it for: - Game development: manage rectangular collision areas and sprite bounds without a full game engine - UI layout: calculate and adjust rectangular regions for window or widget positioning - Geometric calculations: compute rectangle intersections, containment, and coordinate transformations - Collision detection: use rect attributes to test overlap and containment between game objects - Graphics rendering: define rectangular drawing areas and viewport regions in custom renderers ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. PyRect provides a Rect class for representing and manipulating rectangular areas, with attributes and calculations similar to Pygame's Rect but as a standalone module. Yes, if you need Pygame-like rect operations without Pygame and can tolerate a dormant package. The library is small, dependency-free, and stable for its core use case. However, install friction is high (source distribution only), and the last release was in 2022—verify that it meets your Python version and feature needs before committing. No known security vulnerabilities. ## Install pip install pyrect uv add pyrect poetry add pyrect ## Installing PyRect Before you install: Installation friction is high due to source distribution only (PyRect-0.2.0.tar.gz). The package is dormant—last release was 2022-03-16, though the repository remains active with a recent commit on 2024-08-18. No runtime dependencies. License in practice: BSD license is permissive, allowing commercial and private use with minimal restrictions. You may use, modify, and distribute PyRect freely provided you retain the license notice. Quickstart: pip install pyrect import pyrect r = pyrect.Rect(0, 0, 10, 20) print(r.width, r.height, r.center) Verify before relying: - Whether the package is actively maintained or accepting contributions despite dormant status - Whether high install friction (source distribution only) reflects ongoing build/packaging constraints - Compatibility with modern Python versions beyond those explicitly listed in classifiers ## Package facts - License: BSD (permissive) - Python support: unspecified - Install friction: high - Maintenance: dormant - Downloads: 2.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags pygame rect class standalone, rectangular area geometry, rect coordinates and dimensions, pygame-like rect without pygame, rectangle position and size, rect collision and positioning, geometric rectangle math, geometry, pygame-compatible, no-dependencies [View on SkillFed](https://skillfed.io/packages/pyrect) · [View on PyPI](https://pypi.org/project/pyrect/)