Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

PyBevy: A Python Real-Time Engine Built on Bevy

License pypi pypi downloads Discord

pybevy.com: Beta. Python 3.12+. API evolving, breaking changes expected. Independently developed, community-maintained. Not affiliated with the Bevy project.

Write Python, save the file, and see your 3D scene update. Use NumPy, JAX, and PyTorch in the same process as a real 3D renderer. A native MCP server puts coding agents on the same loop.

  • Fast hot reload: edit code, see changes near instantly, no restart, no recompile
  • Built on Bevy's renderer and ECS: PBR, volumetric fog, cascaded shadows, bloom, SSAO, and more
  • Python ecosystem in-process: NumPy, JAX, PyTorch, Numba. Just import.
  • Native MCP server: fast iteration and hot reload for coding agents
  • If you know Bevy's Rust API, PyBevy should feel immediately familiar

Getting Started

Installation

$ pip install pybevy

Pre-compiled wheels are available for Linux (x86_64), macOS (Apple Silicon and x86_64), and Windows (x86_64). Python 3.12+. See Installation for further details.

PyBevy ships an integrated MCP server, so a coding agent works the same loop you do: write Python, hot reload, screenshot the result, inspect entities. See docs/mcp.md for full setup.

codex mcp add pybevy -- pybevy mcp    # or claude/gemini/opencode...

Quick Example

Parent-child entity hierarchy with a rotating parent cube. The child cube inherits the parent's transform automatically.

from pybevy.decorators import component, entrypoint
from pybevy.prelude import *


@component
class Rotator(Component):
    """Marks entities that should rotate."""


def rotate(time: Res[Time], query: Query[Mut[Transform], With[Rotator]]) -> None:
    for transform in query:
        transform.rotate_x(3.0 * time.delta_secs())


def setup(
    commands: Commands,
    meshes: ResMut[Assets[Mesh]],
    materials: ResMut[Assets[StandardMaterial]],
) -> None:
    cube = meshes.add(Cuboid(2.0, 2.0, 2.0))
    material = materials.add(StandardMaterial(base_color=Color.srgb(0.8, 0.7, 0.6)))

    commands.spawn(
        Mesh3d(cube), MeshMaterial3d(material),
        Transform.from_xyz(0.0, 0.0, 1.0), Rotator(),
    ).with_children(
        lambda parent: parent.spawn(
            Mesh3d(cube), MeshMaterial3d(material),
            Transform.from_xyz(0.0, 0.0, 3.0),
        )
    )

    commands.spawn(PointLight(), Transform.from_xyz(4.0, 5.0, -4.0))
    commands.spawn(
        Camera3d(),
        Transform.from_xyz(5.0, 10.0, 10.0).looking_at(Vec3.ZERO, Vec3.Y),
    )


@entrypoint
def main(app: App) -> App:
    return (
        app.add_plugins(DefaultPlugins)
        .add_systems(Startup, setup)
        .add_systems(Update, rotate)
    )


if __name__ == "__main__":
    main().run()

Save this as main.py and run with hot reload. Edit the code. The engine hot reloads near instantly, no restart, no recompile.

pybevy watch main.py

Integrate with Rust-based Bevy

If you already have a Rust Bevy application, you can embed Python systems into it with PyBevyPlugin. Prototype in Python, ship critical paths in Rust.

Security: PyBevyPlugin embeds a full CPython interpreter with unrestricted host access. Never execute untrusted Python code. We advise against using this for user-submitted plugin/modding systems without external sandboxing.

# Cargo.toml
[dependencies]
bevy = "0.19"
pybevy = { version = "0.3", features = ["native-plugin"] }
// main.rs - Your existing Rust Bevy application
use bevy::prelude::*;
use pybevy::PyBevyPlugin;

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        // Add Python systems from a module
        .add_plugins(
            PyBevyPlugin::new("game_logic")
                .with_startup_system("setup")
                .with_update_system("ai_behavior")
                .with_hot_reload()  // Edit Python, press F5 to reload!
        )
        // Mix with native Rust systems
        .add_systems(Update, physics_step)
        .run();
}
# game_logic.py
from pybevy.prelude import *

ROTATION_SPEED = 1.0  # Change this and press F5!

def setup(commands: Commands) -> None:
    commands.spawn(Transform.from_xyz(0.0, 0.0, 0.0))

def ai_behavior(query: Query[Mut[Transform]], time: Res[Time]) -> None:
    for transform in query:
        transform.rotation *= Quat.from_rotation_y(time.delta_secs() * ROTATION_SPEED)

See docs/native-plugin.md for the full guide, including #[derive(PyComponent)] for exposing Rust components to Python and hot reload details.

Reflected world data can be exchanged with Rust Bevy through .scn.ron assets. See the Bevy interoperability guide.

Bevy Compatibility

PyBevy versions target specific Bevy versions:

pybevy Bevy
0.3.x 0.19
0.2.x 0.18
0.1.x 0.18

PyBevy follows Bevy's API conventions as closely as possible and targets full coverage of Bevy's public API. Core modules like transforms, lighting, cameras, and input are fully covered; others are in progress. See Limitations for known constraints.

Development Process

PyBevy started in May 2025 as a pure-Python ECS prototype, then moved through a ctypes FFI layer before pivoting to PyO3, which became the real foundation. Hand-written .pyi type stubs drove the API design before the Rust integration was fully in place. The project also builds on Bevy experience going back to 2021.

The ECS query model, safety/validity system, and core Bevy component bindings were developed manually across multiple iterations.

From November 2025 onward, AI tools were used more heavily for API coverage expansion across Bevy's large surface area, crate splitting into ~30 feature crates, and parts of the test/stub/documentation workflow.

To keep that process grounded, PyBevy is backed by a custom Rust API compliance tool that validates bindings against Bevy's source and the Python stubs, and an unpublished test suite spanning 100K+ lines.

Limitations

  • No built-in physics: use NumPy or JAX for physics computation, PyBevy for visualization.
  • Desktop only: Linux, macOS, Windows. No mobile.
  • Code only: no visual editor.
  • API is evolving: see Limitations for known constraints.

Documentation

Community & Contributing

License

All code in this repository is dual-licensed under either:

at your option.

By contributing, you agree your work will be released under both licenses.

Metadata

Release files for pybevy 0.3.0rc1

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

Source distribution (sdist)

Source distribution for pybevy 0.3.0rc1
File Size Uploaded
pybevy-0.3.0rc1.tar.gz 2.1 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for pybevy 0.3.0rc1
File
pybevy-0.3.0rc1-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
pybevy-0.3.0rc1-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details
pybevy-0.3.0rc1-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
pybevy-0.3.0rc1-cp314-cp314-macosx_10_12_x86_64.whl CPython 3.14 CPython 3.14 macOS 10.12+ x86-64 Details
pybevy-0.3.0rc1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
pybevy-0.3.0rc1-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
pybevy-0.3.0rc1-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
pybevy-0.3.0rc1-cp313-cp313-macosx_10_12_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.12+ x86-64 Details
pybevy-0.3.0rc1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
pybevy-0.3.0rc1-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
pybevy-0.3.0rc1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
pybevy-0.3.0rc1-cp312-cp312-macosx_10_12_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.12+ x86-64 Details

Total release size: 449.4 MB

Release files / pybevy-0.3.0rc1.tar.gz

Download URL pybevy-0.3.0rc1.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
19ae1be48c4b2203a89b9059ac646bc6532ab9f39f318cce06252a90d7da8e90
BLAKE2b-256 checksum
How to use checksums
becf68a0d4d8177341de558fb5c81a65d1ea930993beddbbc5baa7225a3a6e67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / pybevy-0.3.0rc1-cp314-cp314-win_amd64.whl

Download URL pybevy-0.3.0rc1-cp314-cp314-win_amd64.whl
Size 39.6 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
81a7b6fd5f0df90a0c985131de96cc097b59e2439d476cabea7d46922645d897
BLAKE2b-256 checksum
How to use checksums
1226107ef8065a4488ce40eab068500c1d5f5fc919473cab5699aaa4f95d747c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / pybevy-0.3.0rc1-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL pybevy-0.3.0rc1-cp314-cp314-manylinux_2_28_x86_64.whl
Size 38.1 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
a7cea787ef35c75ef60edb36efdcd381a2d7c1848f2f7fad8738cc279e296d76
BLAKE2b-256 checksum
How to use checksums
90f8956708d0f1e836ea49faab944b43dea9937f9b74a21f1564b83834f7e266
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / pybevy-0.3.0rc1-cp314-cp314-macosx_11_0_arm64.whl

Download URL pybevy-0.3.0rc1-cp314-cp314-macosx_11_0_arm64.whl
Size 34.7 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e6e5ca6b2d42ea213a36409bccce4df16bb3e40be89de9f335e92a892bda2333
BLAKE2b-256 checksum
How to use checksums
6b83a83f44627e0e98cdf8db5e802c8045c252685700cd663b36a6bac2cd45d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / pybevy-0.3.0rc1-cp314-cp314-macosx_10_12_x86_64.whl

Download URL pybevy-0.3.0rc1-cp314-cp314-macosx_10_12_x86_64.whl
Size 36.6 MB
Tags CPython 3.14 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
ff277a797a3ace96b5b30e7562853685a7a564355ff22e77adbb6ff660b3c8e6
BLAKE2b-256 checksum
How to use checksums
b0d95ef564317818b2a9dfef7f04959506a7c86f2a47da5c1609e96c994d9f02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / pybevy-0.3.0rc1-cp313-cp313-win_amd64.whl

Download URL pybevy-0.3.0rc1-cp313-cp313-win_amd64.whl
Size 39.6 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
650020ebd565bed57523f3506bc1d73f04ed9158865dd47174254737defe5ef5
BLAKE2b-256 checksum
How to use checksums
f1b72e28021b29f9ac69eabe0fd00034f161de8513975df033730218b9216255
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / pybevy-0.3.0rc1-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL pybevy-0.3.0rc1-cp313-cp313-manylinux_2_28_x86_64.whl
Size 38.2 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
121fbb70065b9981415bb6f7f6e8136466205e7863f2a54a90a72ea297915955
BLAKE2b-256 checksum
How to use checksums
a67a77dbff4847801dedb4745bb9b87c69d92b909aea02aedbf2ba720a019bc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / pybevy-0.3.0rc1-cp313-cp313-macosx_11_0_arm64.whl

Download URL pybevy-0.3.0rc1-cp313-cp313-macosx_11_0_arm64.whl
Size 34.8 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2615cd5139f90633f7d6e467ace2412b3bd09f60b4e7495d6e4f58dd34b702f6
BLAKE2b-256 checksum
How to use checksums
704ac465d134a0a0a4f8e08edea01c46980be54b28eea737b6809ec158522345
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / pybevy-0.3.0rc1-cp313-cp313-macosx_10_12_x86_64.whl

Download URL pybevy-0.3.0rc1-cp313-cp313-macosx_10_12_x86_64.whl
Size 36.6 MB
Tags CPython 3.13 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
0f9e2b2c35669faf42bf5a8ac2b10d2df2c67056f956cde01f467f36f94de3a5
BLAKE2b-256 checksum
How to use checksums
06b8e0f9faa2acf656b85811eeb48eb5d648cb05a2e15b9bfdb44d5da736f8a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / pybevy-0.3.0rc1-cp312-cp312-win_amd64.whl

Download URL pybevy-0.3.0rc1-cp312-cp312-win_amd64.whl
Size 39.6 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
c61186626178dbe1c6a8367cc3d74a92a7dd938883e452a3b08f0438a8cfc0a4
BLAKE2b-256 checksum
How to use checksums
d77b2a3c9e0a066bcb33f0e99bdcb22258ea3af486ee403e898b8668615d946a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / pybevy-0.3.0rc1-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL pybevy-0.3.0rc1-cp312-cp312-manylinux_2_28_x86_64.whl
Size 38.1 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
101e86e4180fc327b5922bccfa486cb4297ccf02e3052945c3bf5a766ca6ac80
BLAKE2b-256 checksum
How to use checksums
cf4d2bb51405f854c665c634a89a28f52ae45a364625367b55fa4a53e409b61c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / pybevy-0.3.0rc1-cp312-cp312-macosx_11_0_arm64.whl

Download URL pybevy-0.3.0rc1-cp312-cp312-macosx_11_0_arm64.whl
Size 34.7 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
23b7b7e580254ec042c65b7cb72bf25d09add7fedc3e95bafc94613ccb8717f3
BLAKE2b-256 checksum
How to use checksums
93e17d1d6bcfaaf748392616046644cc93649992371e323f65fcfb2671982d4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / pybevy-0.3.0rc1-cp312-cp312-macosx_10_12_x86_64.whl

Download URL pybevy-0.3.0rc1-cp312-cp312-macosx_10_12_x86_64.whl
Size 36.6 MB
Tags CPython 3.12 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
f301cfb7022937399c2d9fec0f9a369e94878a4e2038d8fb891e46a7c7382737
BLAKE2b-256 checksum
How to use checksums
e6d3afc26f058335056e5afd4531a3dd71bab9a89eafbd56ecdb8226af2bb5d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0rc1 This release

13 release files

0.2.1

12 release files

0.2.0

12 release files

0.1.0

12 release files

0.0.2

2 release files

0.0.1

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