Created
April 23, 2025 10:45
-
-
Save igalshilman/fae0ce8ceab55eada1c17789f1b18d01 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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