A Python game engine for the browser
Project description
Enpyre
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.
Install and Usage
Enpyre python engine only works inside Pyodide environment.
With Enpyre npm package
Just start a React project and add enpyre package.
Standalone
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 *
`);
Example games
See examples of usage.
Development
Install Poetry
- 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 -
Install dependencies
poetry install
Pre commit install
pre-commit install
Run server
./start.sh
Local package
Set you web appliction to install enpyre package from http://localhost:8080/enpyre-0.0.1-py3-none-any.whl
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.