Releases: restatedev/sdk-python
Releases · restatedev/sdk-python
v0.17.1
v0.17.0
What's Changed
- Use WarpBuild runners for CI workflows by @tillrohrmann in #185
- Introduce RetryableError by @hatstand in #184
- Add a RestateTracer and RestateTracerProvider for AI observability by @gvdongen in #187
New Contributors
Full Changelog: v0.16.0...v0.17.0
v0.16.0
What's Changed
- Pydantic AI integration: upgrade pydantic ai library to 1.68.0. Disable autowrapping tools in ctx.run. Default retry strategy for LLM calls is now 10 attemps with 1 second minimum interval.
- Google ADK integration: Added RestateEventsSummarizer to wrap LLM summarization calls in durable steps and added flushing compaction events in append_event to Restate.
Bug fixes
- fix: #175 BidiStream SIGTERM causes CPU hot loop and pod stuck in Terminating by @brightsparc in #176
- Bump shared core, bump max protocol version, update feature matrix by @slinkydeveloper in #183
New Contributors
- @brightsparc made their first contribution in #176
Full Changelog: v0.15.0...v0.16.0
v0.15.0
What's Changed
- Support zstd compression in python 3.14+ by @jackkleeman in #174
Full Changelog: v0.14.2...v0.15.0
v0.14.2
What's Changed
- Update shared core by @slinkydeveloper in #170
- Fix stacktrace propagation inside ctx.run by @slinkydeveloper in #171
Full Changelog: v0.14.0...v0.14.2
v0.14.0
What's Changed
- doc: fix various typos by @didier-durand in #168
- Add pydantic ai by @igalshilman in #167
- [extensions] Avoid global state in the ADK plugin by @igalshilman in #169
New Contributors
- @didier-durand made their first contribution in #168
Full Changelog: v0.13.2...v0.14.0
v0.13.2
What's Changed
- OpenAI integration: DurableRunner with LLM retry opts and lazy session flushing by @gvdongen in #164
- Add explicit tool execution synchronization by @igalshilman in #165
- Cancel subsequent tools by @igalshilman in #166
Full Changelog: v0.13.1...v0.13.2
v0.13.1
v0.13.0
New features 🎉
- Use context manager together with service handlers:
@contextvar
@asynccontextmanager
async def my_resource_manager():
yield "hello"
@greeter.handler(invocation_context_managers=[my_resource_manager])
async def greet_with_cm(ctx: Context, name: str) -> str:
return my_resource_manager.value- Add
msgspecsupport, works out of the box when addingrestate_sdk[serde]dependency:
# models
class GreetingRequest(msgspec.Struct):
name: str
class Greeting(msgspec.Struct):
message: str
msgspec_greeter = Service("msgspec_greeter")
@msgspec_greeter.handler()
async def greet(ctx: Context, req: GreetingRequest) -> Greeting:
return Greeting(message=f"Hello {req.name}!")- Add extension modules for Google ADK and OpenAI, more info soon!
What's Changed
- Add current_context() extension point by @igalshilman in #148
- Add context manager support by @igalshilman in #149
- Rename to invocation_context_managers by @igalshilman in #150
- Rethrow TerminalError/SdkBaseException accidentally wrapped by @igalshilman in #151
- feat: add msgspec support by @v1gnesh in #154
- Consolidate msgspec conditional imports into a single place by @igalshilman in #155
- Use DefaultSerde instead of JsonSerde for promise() default parameter by @Gustavo-Hagenbeck in #157
- Support
union | Nonereturn types by @igalshilman in #158 - Use HttpError for the typed ingress client by @igalshilman in #159
- Replace traceback.print_exc() with logger.exception() for proper logging by @Gustavo-Hagenbeck in #160
- Add an optional extension module for Google ADK integration by @igalshilman in #161
- Add an optional ext module for openai by @igalshilman in #162
New Contributors
- @v1gnesh made their first contribution in #154
- @Gustavo-Hagenbeck made their first contribution in #157
Full Changelog: v0.12.0...v0.13.0
v0.12.0
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
- Revert usage of asyncio cancellation mechanism by @slinkydeveloper in #142
- Update
crazy-max/ghaction-setup-dockerto v4 by @muhamadazmy in #144 - Use modern lints, tools and type checkers by @igalshilman in #143
- Add typed client by @igalshilman in #145
- Add test for harness and typed client. Fix name of TestHarnessEnvironment so it doesn't get mixed up in pytest. Fix imports in init by @slinkydeveloper in #147
Full Changelog: v0.11.0...v0.12.0