Get started with pyodide CDN
Apache-2.0 licensed
Pyodide is a library that enables running Python scientific and data science libraries in the browser without needing a local Python installation.
Tags:- python
- webassembly
Stable version
Copied!
How to start using pyodide CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with pyodide CDN - cdnhub.io</title>
<script src="https://cdn.jsdelivr.net/npm/pyodide@0.25.0/full/pyodide.js"></script>
<script>
async function main() {
await loadPyodide();
const py = await pyodide;
const np = py.numpy;
// Create a NumPy array
const arr = np.array([1, 2, 3, 4, 5]);
// Print the NumPy array
console.log(arr);
// Perform some simple NumPy operations
const squared = np.square(arr);
const sum = np.sum(arr);
console.log('Squared:', squared);
console.log('Sum:', sum);
}
main();
</script>
</head>
<body>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
All versions
0.19.1
0.20.0
0.20.0-alpha.1
0.20.1-alpha.1
0.20.1-alpha.2
0.21.0
0.21.0-alpha.1
0.21.0-alpha.2
0.21.0-alpha.3
0.21.1
0.21.2
0.21.3
0.22.0
0.22.0-alpha.1
0.22.0-alpha.2
0.22.0-alpha.3
0.22.1
0.23.0
0.23.0-alpha.1
0.23.1
0.23.2
0.23.3
0.23.4
0.24.0
0.24.0-alpha.1
0.24.1
0.25.0
0.25.0-alpha.1
0.25.0-alpha.2
0.25.1
0.26.0
0.26.0-alpha.1
0.26.0-alpha.2
0.26.0-alpha.3
0.26.0-alpha.4
0.26.0-alpha.5
0.26.0-alpha.6
0.26.0-dev.0
0.26.1
*** 0.26.2