--- id: box2d version: "2.3.10" license: zlib license_treatment: permissive maintenance: dormant --- # Box2D — Python Box2D License: permissive · Maintenance: dormant · Downloads: 97.1K/mo ## What it is and what it does Box2D is a Python wrapper around the Box2D physics engine, a mature C++ library for simulating 2D rigid-body dynamics. It provides tools to create worlds, bodies, shapes (circles, polygons, line segments), and joints (revolute, prismatic, wheel, and others), making it suitable for building games, physics simulations, and interactive visualizations. The package ships with a testbed containing dozens of example scenarios demonstrating collision handling, joint mechanics, and various physics phenomena. To visualize simulations, you pair Box2D with a rendering backend such as pygame, pyglet, or OpenCV. The library has no runtime dependencies—it's a self-contained binding—but installation requires a prebuilt wheel or a C++ compiler to build from source. Use it for: - Build 2D games with realistic physics-based movement, collisions, and joint constraints. - Create physics simulations and educational demonstrations of mechanics, gravity, and collision behavior. - Prototype interactive physics-based visualizations paired with pygame or pyglet for rendering. - Implement ragdoll or articulated-body systems using revolute and prismatic joints. - Test collision detection and response algorithms in a well-established physics framework. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Box2D is a Python binding to the Box2D C++ physics engine, providing 2D rigid-body simulation for games and physics-based applications with support for multiple shape and joint types. Yes, if you need a stable, proven 2D physics engine for games or simulations and can tolerate dormancy. Box2D is mature and widely used, with no known vulnerabilities and permissive licensing. However, the last release was in 2020 and maintenance is minimal—if you require active development, bug fixes for modern Python versions, or ongoing support, consider whether an actively maintained alternative better fits your timeline. For existing projects or prototypes, it remains reliable. ## Install pip install box2d uv add box2d poetry add box2d ## Installing Box2D Before you install: Medium install friction due to compiled wheels; prebuilt binaries are available for recent Python versions across Windows, macOS, and Linux, but the package is dormant—last release was 2020-04-11 with minimal recent maintenance activity despite an active repository. License in practice: Licensed under zlib (permissive), allowing use in commercial and proprietary projects with minimal restrictions; attribution is typically required but the license imposes no copyleft obligations. Quickstart: pip install Box2D import Box2D from Box2D import b2World, b2BodyDef, b2CircleShape world = b2World(gravity=(0, -10)) body_def = b2BodyDef(position=(0, 0)) body = world.CreateBody(body_def) Requires a compiled wheel matching your Python version and platform; if no prebuilt wheel is available for your environment, installation will fail unless you can build from source (requires C++ compiler and development headers). Verify before relying: - Whether prebuilt wheels are available for Python versions beyond those listed in friction evidence or for other architectures. - Current state of the repository's build infrastructure and whether new wheels are being generated for recent Python releases. - Whether the dormant status affects stability or introduces compatibility issues with modern Python ecosystems. ## Package facts - License: zlib (permissive) - Python support: unspecified - Install friction: medium - Maintenance: dormant - Downloads: 97.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags 2d physics engine python, rigid body simulation, box2d python binding, game physics library, 2d collision detection, physics-based game development, box2d wrapper, physics-simulation, game-development, 2d-graphics [View on SkillFed](https://skillfed.io/packages/box2d) · [View on PyPI](https://pypi.org/project/box2d/)