python-sh package icon
wasmer/python-sh
Public
wasmer run wasmer/python-sh

Python

You can install Python with:

wapm install python

Running

From WAPM

Run a locally python script in the ./lib directory:

wasmer --net python/python --mapdir=/lib:./lib -- /lib/pythonfile.py

Note: this assumes you have a file named ./lib/pythonfile.py.

From Locally-built Binary

Follow the "Building from Source" instructions below, then:

BUILDDIR="$(PWD)/cpython/builddir-wasix-libc/wasi/"
wasmer --net $BUILDDIR/python.wasm --mapdir=/lib:./lib --mapdir=/usr:$BUILDDIR/usr -- /lib/pythonfile.py

Note: this assumes you have a file named ./lib/pythonfile.py.

Building from Source

Dependencies

  • GNU Make
  • WASI SDK
  • native C toolchain (eg. gcc or clang)

Instructions

To download the WASI SDK and build cpython and its dependencies:

git submodule init
git submodule update --recursive
make wasi-sdk
make

Browser site for python.

More packages
Python is an interpreted, high-level, general-purpose programming language
syrusakbary avatar
syrusakbary
Wiqar Chaudry
Wiqar Chaudry
+1
Deployable
syrusakbary avatar
syrusakbary
Wiqar Chaudry
Wiqar Chaudry
+1
Deployable
python web shell
christoph avatar
christoph
christoph avatar
christoph
python web shell
Pxlmastr
Pxlmastr
Pxlmastr
Pxlmastr
python web shell
zegevlier avatar
zegevlier
zegevlier avatar
zegevlier
python web shell
Igor
Igor
Igor
Igor