Skip to content

Generate event stream operations on async clients - #997

Open
stobrien89 wants to merge 1 commit into
developfrom
python-client-event-streams
Open

stobrien89 wants to merge 1 commit into
developfrom
python-client-event-streams

Conversation

@stobrien89

Copy link
Copy Markdown
Contributor

Issue #, if available:

Stacked on #995.

Description of changes:

Generated clients now support event stream operations, matching the Java generator. With #995, the Python generator can generate every client aws-sdk-python ships (39, versus 27 before both PRs), including S3, Bedrock Runtime, Kinesis, Lambda and Transcribe Streaming.

  • Event stream operations are generated on async clients only, like Java. Sync clients leave them out.
  • The method returns AsyncInputEventStream, AsyncOutputEventStream or AsyncDuplexEventStream, depending on which sides stream, and calls pipeline.input_stream, output_stream or duplex_stream.
  • Receiving streams use the event union's _<Union>Deserializer, which the runtime registry already builds.

Fix found along the way: rest-json-1-client is now big enough for partitioned stubs, and the facade didn't re-export dictionary forms, since a stub only re-exports what __all__ names. The facade now adds them, and the union deserializers, to __all__. This also affects large AWS clients such as EC2.

rest-json-1-client now includes the 7 event stream operations, so no projection omits operations. A new unit test checks that an event stream operation is async only.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@stobrien89
stobrien89 requested a review from a team as a code owner November 30, 2026 12:56
kuhe
kuhe previously approved these changes Nov 30, 2026
@stobrien89
stobrien89 added this pull request to stack #998 November 30, 2026 16:02
@stobrien89
stobrien89 force-pushed the python-client-event-streams branch from 28e0de4 to dc1eac1 Compare November 30, 2026 16:08
@stobrien89
stobrien89 force-pushed the python-client-event-streams branch 2 times, most recently from b6ee7e9 to 89099dc Compare November 30, 2026 17:32
Base automatically changed from python-client-streaming to develop November 30, 2026 18:17
@stobrien89
stobrien89 force-pushed the python-client-event-streams branch from 89099dc to efa7fcb Compare November 30, 2026 18:17
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