# pyodide

> The Pyodide JavaScript package

Latest version **314.0.7** (published 2026-09-14) · MPL-2.0 license · 0 weekly downloads

## Install

```sh
npm install pyodide
pnpm add pyodide
yarn add pyodide
bun add pyodide
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score; popular repo.

Warnings: low downloads; large bundle.

## Facts

| | |
|---|---|
| Version | 314.0.7 |
| Published | 2026-09-14 |
| First published | 2020-06-08 |
| Weekly downloads | 0 |
| License | MPL-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18.0.0 |
| Dependencies | 2 |
| Unpacked size | 13.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14878 |
| Maintainers | hoodmane, ryurchak, ryanking13 |
| Keywords | python, webassembly |

## Links

- npm: https://www.npmjs.com/package/pyodide
- Repository: https://github.com/pyodide/pyodide
- Issues: https://github.com/pyodide/pyodide/issues
- npm.io page: https://npm.io/package/pyodide

## Dependencies (2)

- [ws](https://npm.io/package/ws.md) ^8.5.0
- [@types/emscripten](https://npm.io/package/@types/emscripten.md) ^1.41.4

## Recent versions

- 314.0.7 (latest) — 2026-09-14
- 0.27.8 (stable-0.27) — 2026-09-16
- 0.29.5 (stable-0.29) — 2026-09-16
- 315.0.0-alpha.2 (next) — 2026-08-04
- 0.19.0-alpha.1 (beta) — 2021-12-21
- 314.0.6 — 2026-08-25
- 314.0.5 — 2026-08-17
- 314.0.4 — 2026-08-04
- 315.0.0-alpha.1 — 2026-08-01
- 314.0.3 — 2026-07-24
- 314.0.2 — 2026-06-30
- 314.0.1 — 2026-06-26
- 314.0.0 — 2026-06-09
- 314.0.0-alpha.2 — 2026-05-13
- 0.29.4 — 2026-05-07
- … 71 more at https://npm.io/package/pyodide/versions

## README

# Pyodide JavaScript package

<a href="https://www.npmjs.com/package/pyodide"><img src="https://img.shields.io/npm/v/pyodide" alt="npm"></a>

## Usage

Download and extract Pyodide packages from [Github
releases](https://github.com/pyodide/pyodide/releases)
(`pyodide-build-*.tar.bz2`). The version of the release needs to match exactly the version of this package.

Then you can load Pyodide in Node.js as follows,

```js
// hello_python.js
const { loadPyodide } = require("pyodide");

async function hello_python() {
  let pyodide = await loadPyodide({
    indexURL: "<pyodide artifacts folder>",
  });
  return pyodide.runPythonAsync("1+1");
}

hello_python().then((result) => {
  console.log("Python says that 1+1 =", result);
});
```

```
$ node hello_python.js
Python says that 1+1= 2
```

Or you can use the REPL. To start the Node.js REPL with support for top level
await, use `node --experimental-repl-await`:

```
$ node --experimental-repl-await
Welcome to Node.js v18.5.0.
Type ".help" for more information.
> const { loadPyodide } = require("pyodide");
undefined
> let pyodide = await loadPyodide();
undefined
> await pyodide.runPythonAsync("1+1");
2
```

## Details

The JavaScript code in this package is responsible for the following tasks:

1. Defines the public [JavaScript API](https://pyodide.org/en/stable/usage/api/js-api.html)
   - Package loading code to allow loading of other Python packages.
   - Can load
     [micropip](https://pyodide.org/en/stable/usage/api/micropip-api.html) to
     bootstrap loading of pure Python wheels
2. Loads the CPython interpreter and the core/pyodide emscripten application
   which embeds the interpreter.
3. Injects the `js/pyodide` JavaScript API into `sys.modules`. This is the
   final runtime dependency for `core/pyodide` & `py/pyodide`, so after this step
   the interpreter is fully up and running.

---
_Source: https://npm.io/package/pyodide · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
