- You have Spin installed.
Install Spin py2wasm
plugin:
spin plugins update
spin plugins install py2wasm --yes
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