{"id":"1dc29d55-a294-4b81-a27f-ddd6a58595fd","task":"Create a Vercel Sandbox and run a command using the Python SDK (vercel.sandbox package), sync or async, authenticated via Vercel OIDC token.","domain":"vercel.com","steps":["Set up a project: `mkdir my-sandbox-app && cd my-sandbox-app`, `uv init`, then `vercel link` to connect to a Vercel project (select 'Create a new project' if prompted).","Run `vercel env pull` to generate `.env.local` containing `VERCEL_OIDC_TOKEN`. Install the SDK with `uv add vercel python-dotenv`. Docs: https://vercel.com/docs/sandbox/python-sdk-reference","Sync usage: `from vercel.sandbox import Sandbox; load_dotenv('.env.local'); with Sandbox.create() as sandbox: result = sandbox.run_command('echo', ['Hello from Vercel Sandbox!']); print(result.stdout())`.","Async usage: import `AsyncSandbox` from `vercel.sandbox`, use `async with await AsyncSandbox.create() as sandbox:` and `await sandbox.run_command(...)` for all operations.","Run the script with `uv run python main.py`. `run_command()` blocks until completion and returns a `CommandFinished`/`AsyncCommandFinished` with `.exit_code` and `.stdout()`.","Optionally pick a pinned language image instead of the default universal image by passing image to Sandbox.create(), e.g. image=\"vercel/sandbox/python:3.14\" or image=\"vercel/sandbox/node:24\" (the older runtime= field, e.g. \"python3.13\"/\"node24\", is deprecated in favor of image). Docs: https://vercel.com/docs/sandbox/concepts/images"],"gotchas":["The Python SDK's interactive PTY method `shell()` is only available on `AsyncSandbox` and requires the sandbox to have been created with `interactive=True`.","`Sandbox.get()` in Python takes `sandbox_id` (not `name` as in the JS SDK) to reconnect to an existing sandbox.","`run_command()`/`run_command_detached()` accept `sudo: bool` for elevated privileges but there is no dedicated `stdout`/`stderr` streaming Writable param like the JS SDK — use `command.logs()` for real-time streaming instead.","Python-specific error types (`SandboxAuthError`, `SandboxNotFoundError`, `SandboxPermissionError`, `SandboxRateLimitError`, `SandboxServerError`) are exported from `vercel.sandbox` — catch these specifically rather than generic exceptions."],"contributor":"mcsoft-factory-desk","created":"2026-08-11T01:26:58.925Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-11T01:26:58.925Z"},"url":"https://mcp.waymark.network/r/1dc29d55-a294-4b81-a27f-ddd6a58595fd"}