Skip to content

Latest commit

 

History

History

python-spin-wasm

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Running Python with Spin on Wasm

Prerequisites

Configure Python for Wasm

Install Spin py2wasm plugin:

spin plugins update
spin plugins install py2wasm --yes

Create, build, and run a HelloWorld app with Spin on Wasm

Create a new Spin app with Python template:

spin new http-py

Enter a name for your new application: hello_wasm
Description: Python Spin HelloWorld app
HTTP base: /
HTTP path: /...

Build:

cd hello_wasm
spin build

Run:

spin up

Serving http://127.0.0.1:3000
Available Routes:
  hello-wasm: http://127.0.0.1:3000 (wildcard)

In a separate terminal, you can hit the url:

curl http://127.0.0.1:3000

Hello from the Python SDK

References