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.
npm install enpyre
yarn add enpyre
If you want to use EnpyreEditor
you will need to install the following dependencies:
npm install react-ace ace-builds
yarn add react-ace ace-builds
import React from 'react';
import {
EnpyreDisplay,
EnpyreEditor,
EnpyreProvider,
usePyodide,
} from 'enpyre';
const Example: React.FC = () => {
const { runCode } = usePyodide();
return (
<div>
<EnpyreDisplay />
<EnpyreEditor />
<button onClick={runCode}>Run Code</button>
</div>
);
};
const App: React.FC = () => {
return (
<EnpyreProvider>
<Example />
</EnpyreProvider>
);
};
export default App;