Skip to content

Instantly share code, notes, and snippets.

@syrusakbary
Created July 30, 2026 04:58
Show Gist options
  • Select an option

  • Save syrusakbary/3f17e1f8f080e3d110746d2d52e7eeab to your computer and use it in GitHub Desktop.

Select an option

Save syrusakbary/3f17e1f8f080e3d110746d2d52e7eeab to your computer and use it in GitHub Desktop.
Wasmer SDK Example
# uv add wasmer-sdk / pip install wasmer-sdk
import asyncio
from wasmer_sdk import Wasmer
async def main() -> None:
client = Wasmer()
sandbox = await client.sandboxes.create(
packages=["python/python", "wasmer/edgejs-quickjs", "php/php-32",]
)
print((await sandbox.command("echo", ["hello from shell tools"]).run(check=True)).text().strip())
print((await sandbox.command("python", ["-c", "print('hello from Python')"]).run(check=True)).text().strip())
print((await sandbox.command("edge", ["-e", 'console.log("hello from Edge.js")']).run(check=True)).text().strip())
print((await sandbox.command("php", ["-r", "echo 'hello from PHP';"]).run(check=True)).text().strip())
asyncio.run(main())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment