Skip to content
Dashboard

Vercel Python SDK is now available in beta

from vercel.sandbox import Sandbox
with Sandbox.create(runtime="python3.13") as sandbox:
command = sandbox.run_command("python", ["-c", "print('hello world')"])
print(command.stdout())

from vercel import blob
uploaded_file = blob.upload_file(
local_path="hello-world.txt",
path="uploaded-hello-world.txt",
access="public",
)

from vercel.cache import RuntimeCache
import requests
from fastapi import FastAPI
app = FastAPI()
cache = RuntimeCache()
@app.get("/blog")
def blog():
key = "blog"
val = cache.get(key)
if val:
return val
res = requests.get("https://api.vercel.app/blog")
origin_value = res.json()
cache.set(key, origin_value, {"ttl": 3600, "tags": ["blogs"]})
return origin_value

Ready to deploy?