Skip to content

Latest commit

 

History

History
72 lines (47 loc) · 2.34 KB

README.md

File metadata and controls

72 lines (47 loc) · 2.34 KB

enpyre-logo

Enpyre

A Python game engine in React.
Write python games that run in React applications 👌


build status license


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