Skip to main content

A Python game engine for the browser

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

enpyre-0.0.6.tar.gz (9.0 kB view hashes)

Uploaded Source

Built Distribution

enpyre-0.0.6-py3-none-any.whl (9.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page