Conversation
The stream service is still defined in the server, so its protos are copied in and compiled by a script rather than taken from the api submodule.
temporalio.client_stream opens, appends to, reads and closes a native stream on the server, with the service's errors mapped onto the stream error family.
Live cases run when TEMPORAL_STREAM_TARGET names a server with the stream service, and skip otherwise.
This was referenced Oct 3, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds
temporalio.client_stream, a Python client for the server's native stream service.What changed?
scripts/gen_stream_protos.pycopies the stream service protos out of a server checkout and compiles them intotemporalio.api.streamservice.v1. They're vendored because the service is still defined in the server, not in the api repo.temporalio.client_streamopens, appends to, reads and closes a native stream through that service. It maps the service's errors onto the stream error family.Part of AI-198 (epic AI-37).
Why?
Native streams live on the server, so Python needs a way to talk to them before a provider or a workflow can. This is that wire, kept apart from the provider and the workflow runtime that build on it.
How did you test it?
Link to a test plan if any -
poe lintis clean. The client, owner and record cases pass against a local server built from the stream server PRs, withTEMPORAL_STREAM_TARGETset. Without it they skip. The vendored protos match what the script produces from the server's stream service, except for twoStreamStatefields the stream-to-channel bridge adds later on the server. The client doesn't read them.