python-interpreter
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-beta.1 • Public • Published

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);
})();

Package Sidebar

Install

npm i python-interpreter

Weekly Downloads

1

Version

0.0.1-beta.1

License

MIT

Unpacked Size

82.4 kB

Total Files

25

Last publish

Collaborators

  • qkonstantin