Skip to content

v0.12.0

Latest

Choose a tag to compare

@slinkydeveloper slinkydeveloper released this 18 Nov 17:12
· 4 commits to main since this release

New features πŸŽ‰

  • Added ingress client to send requests from your python applications to restate services:
async with restate.create_client("http://localhost:8080") as client:
  await client.object_call(increment, key="a", arg=5)
  await client.object_send(increment, key="a", arg=5)

  current_count = await client.object_call(count, key="a", arg=None)
  • Added new test harness constructor to be used in combination with @pytest.fixture:
# Your fixture
@pytest.fixture(scope="session")
async def restate_test_harness():
  app = restate.app([greeter])
  async with restate.create_test_harness(app) as harness:
        yield harness
        
# A test example, using the client
async def test_greeter(restate_test_harness: HarnessEnvironment):
    greeting = await restate_test_harness.client.service_call(greet, arg="Pippo")
    assert greeting == "Hello Pippo!"
  • Various type hints improvements, such as #112

What's Changed

Full Changelog: v0.11.0...v0.12.0