0.0.1-beta.1 • Published 6 months ago

python-interpreter v0.0.1-beta.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

python-interpreter

python-interpreter executes Python code via Pyodide and the JupyterLite kernel. This library is a proof of concept and is not intended for production use.

For production environments, consider using robust solutions like Riza or E2B.

Installation

Install the library using npm:

npm install python-interpreter pyodide

Usage

Here's a basic example of how to use python-interpreter:

import { Sandbox } from "python-interpreter";

(async () => {
  const sandbox = await Sandbox.create();

  const execution = await sandbox.execute(`print("hello world")`);

  console.log("Output:", execution);
})();