Skip to content

Conversation

@igalshilman
Copy link
Contributor

@igalshilman igalshilman commented Feb 6, 2025

pip install restate_sdk[harness]
greeter = Service("greeter")

@greeter.handler()
async def greet(ctx: Context, name: str) -> str:
    return f"Hello {name}!"

app = restate.app(services=[greeter])
import restate

with restate.test_harness(app) as harness:
    cli = harness.ingress_client()
    print(cli.post("/greeter/greet", json="Alice").json())


self.network = Network().create()

self.restate = RestateContainer(image="restatedev/restate:1.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be latest, otherwise we need to bump the python sdk every time we update the runtime. Plus i find counterintuitive that we decide here to pin to some version X.

Let the user override the restate image though, so everyone's happy and can pin to a specific restate version if they need to.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yah totally, it is a draft for a reason.

@igalshilman igalshilman marked this pull request as ready for review February 7, 2025 15:29
@igalshilman igalshilman merged commit aac3abc into restatedev:main Feb 7, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants