Bindings for box2d v3
Project description
box2d-py
Python Bindings for Box2D v3 using CFFI
Python bindings for the Box2D physics engine version 3. Provides Pythonic access to Box2D's feature set.
Installation
Install from source using pip
pip install "git+https://github.com/giorgosg/box2d-py.git"
To include the testbed:
pip install "box2d-python[testbed] @ git+https://github.com/giorgosg/box2d-py.git"
Or Install from pypi:
pip install box2d-python[testbed]
Running the Testbed
box2d-testbed
Example Usage
from box2d import World, Vec2
# Create physics world
world = World(gravity=(0, -9.81))
# Create static ground body
ground = world.new_body().static().position((0, -5)).box(1, 10).build()
# Create dynamic bodies
bodybuilder = world.new_body().dynamic().box(0.5, 0.5)
bodies = [bodybuilder.position((x, 5)).build() for x in range(-5, 5)]
# Simulation loop
for _ in range(60):
world.step(1/60, 4)
Development Status
⚠️ Early development preview - API subject to change
Currently supports some of the Box2D v3.0 functionality with active development ongoing.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file box2d_python-0.1.2-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: box2d_python-0.1.2-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 306.6 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95e2fb1ff657eaa4b97348ceb8830da977468a91171536ee229df460a6478bac
|
|
| MD5 |
ae348a216112a996066254e22360d3a0
|
|
| BLAKE2b-256 |
53975a8c6f570497aaa9444b70abbdb510ea7592da735e14d568f4cccbb30308
|
File details
Details for the file box2d_python-0.1.2-cp313-cp313-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: box2d_python-0.1.2-cp313-cp313-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.13, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f545d6b02ede15789f5285f40415b0571333f60cb8fbeeb24935b9f2aa2fecfd
|
|
| MD5 |
110f18e40ae9575e3aa740153c84b448
|
|
| BLAKE2b-256 |
158171b3a48004294269dd85a65676725625321107f798c6f49e585cb0291334
|
File details
Details for the file box2d_python-0.1.2-cp313-cp313-musllinux_1_2_i686.whl.
File metadata
- Download URL: box2d_python-0.1.2-cp313-cp313-musllinux_1_2_i686.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.13, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cf021f75d8cca9cbd911cea07b32cb9fb1f0826d6d964c2efcf618bc238f700
|
|
| MD5 |
c44a55ac08fdafd3522ac0c4a053178e
|
|
| BLAKE2b-256 |
2ce9a8445f68d0d9e772f30dc6d74c0a88958a760e01b44033897e6696340494
|
File details
Details for the file box2d_python-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: box2d_python-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 539.8 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
653f7d250303db3b579f9d26f4e4ec232a24619632ec9b873d1a1209044519af
|
|
| MD5 |
20b8934736111763a93e4e2e2a6b1eff
|
|
| BLAKE2b-256 |
16627f7e31bbb05546e62a27e3897307f5f7cfb8a038159b4741aa08438cb705
|
File details
Details for the file box2d_python-0.1.2-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: box2d_python-0.1.2-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 495.4 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2964dfffc81aad12299b7b3b51a02f1e40129d5d97b320d8b69c264bd7c869cf
|
|
| MD5 |
7ee577c0380a4ee08f5dfd34545b6501
|
|
| BLAKE2b-256 |
49d8c2a12694c594764d2fc6dea37ad836ce72114514ec9e0e1fddcf1d5be320
|
File details
Details for the file box2d_python-0.1.2-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: box2d_python-0.1.2-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 280.6 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1a940f8fe654a25244be177b3c1763dc579f11009f012264d9bdd1e9dc0e4d3
|
|
| MD5 |
fbe380a0e13fb1134d1ba32dd16d3848
|
|
| BLAKE2b-256 |
b023d11b84c4e73a584bc78c45b6435fd3bb1271dfcee2c41c4ec5776ec97f5c
|
File details
Details for the file box2d_python-0.1.2-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: box2d_python-0.1.2-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 306.6 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ca63aaeb357dc0a7fbf6a4b7835ecddb756b04ccd80ceb561e3608d410e29c2
|
|
| MD5 |
0719a354db86a834736fe0c1f09331a9
|
|
| BLAKE2b-256 |
c8522c56e10c82d59f27cd383fc5fdd9b9c7ba1ede8cacb44c332ed5bc889e25
|
File details
Details for the file box2d_python-0.1.2-cp312-cp312-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: box2d_python-0.1.2-cp312-cp312-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.12, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2dc6e2f350f621eb0ba003410914fa31295a70b0c46df377be4672cd797a83a1
|
|
| MD5 |
49a6a616e81c124df620354bda1ead52
|
|
| BLAKE2b-256 |
0dd5f87916b2e9def32d8586b07b753753c612e2030db3ba06a69a2ffd03ad1a
|
File details
Details for the file box2d_python-0.1.2-cp312-cp312-musllinux_1_2_i686.whl.
File metadata
- Download URL: box2d_python-0.1.2-cp312-cp312-musllinux_1_2_i686.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.12, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8dc8683fd57276d288efda01d1dfbd0291c67a7dccabc263012f1c29c2a7762d
|
|
| MD5 |
4289ce3a482331cd45d6957141a79a87
|
|
| BLAKE2b-256 |
97631b240bc1052aa45fff1af1e0f5ff3001f46c0534c7242d720010fdf11d17
|
File details
Details for the file box2d_python-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: box2d_python-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 540.0 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa80352fd8644438bf700099029347eea5d5af56cb13edb7263400b5183cfbbf
|
|
| MD5 |
38b32cdb3e2f7c5b2cb77095002a7839
|
|
| BLAKE2b-256 |
de56cd17bdd9f58fcac7a4b46be07f687b73eb1d7323ac0b71e32cac30d85314
|
File details
Details for the file box2d_python-0.1.2-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: box2d_python-0.1.2-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 495.4 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc143ba9926d50de7ba78575c05a9b149ce575d9d5ba108b73ca831284d3c042
|
|
| MD5 |
96658580998c2cae8706e7c59af55f47
|
|
| BLAKE2b-256 |
226c91a900c7b277318caf2406d25cd98ba28878368774d157cb659b2a437e0e
|
File details
Details for the file box2d_python-0.1.2-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: box2d_python-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 280.6 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75209e5eb03cb8844b62346a39e54b39f5ebafc5c050dc923c8c09b628a0c252
|
|
| MD5 |
e16056a3eaff13b41322b9851a5fd77d
|
|
| BLAKE2b-256 |
548eaec041f805c6108e1f4a26b60e7209ced622771e15ebe38cc40cf9935525
|