Skip to content

Instantly share code, notes, and snippets.

@igalshilman
Created April 23, 2025 10:45
Show Gist options
  • Save igalshilman/fae0ce8ceab55eada1c17789f1b18d01 to your computer and use it in GitHub Desktop.
Save igalshilman/fae0ce8ceab55eada1c17789f1b18d01 to your computer and use it in GitHub Desktop.
from fastapi import FastAPI
import restate
app = FastAPI()
@app.get("/")
async def foo():
return { "foo" : "bar" }
greeter = restate.Service("greeter")
@greeter.handler()
async def greet(ctx: restate.Context, msg: str):
return "hi"
app.mount("/restate", restate.app(services=[greeter]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment