A Python game engine in React.
Write python games that run in React applications 👌
Enpyre is an open-source library to render 2D games made with Python in React with graphics by PIXI.js and the power of Pyodide, WASM, and modern web technologies.
Enpyre python engine only works inside Pyodide environment.
Just start a React project and add enpyre package.
Start a pyodide environment and install enpyre pip package by micropip:
await pyodide.loadPackage('micropip');
await pyodide.runPythonAsync(`
import micropip
await micropip.install('enpyre')
from enpyre import *
`);
See examples of usage.
- OSX/Linux:
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
- Windows:
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python -
poetry install
pre-commit install
./start.sh
Set you web appliction to install enpyre package from http://localhost:8080/enpyre-0.0.1-py3-none-any.whl