You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- The V2 client differentiates between APIs which require a streaming response and those that do not. Those that don't, do not have a parameter to register a callback.
- We now generate both sync and async overloads for all calls. The sync version will block on the future and throw any service errors.
- The client doesn't use request objects, instead using keyword arguments which are then provided to the request object constructor.
- The client now also accepts str in place of bytes and then calls .encode('utf-8') on it for ease of use.
- Client has overloads with the old StreamHandler object as well as options for providing a simple callback for stream events, errors, and closing. Optionally (default is true), an executor will be used to run the stream event callback when the callback is provided as a callback. This prevents users from accidentally blocking the event loop.
- I've updated the data model setters to return this so that we can now chain calls.
- Streaming APIs return the operation so that the user can close the operation/handler
Copy file name to clipboardExpand all lines: docs/awsiot/eventstreamrpc.html
+21-17Lines changed: 21 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -138,7 +138,7 @@ <h3>Navigation</h3>
138
138
This will not be invoked if the connection attempt failed.</p>
139
139
<dlclass="field-list simple">
140
140
<dtclass="field-odd">Parameters</dt>
141
-
<ddclass="field-odd"><p><strong>reason</strong> (<em>Optional</em><em>[</em><aclass="reference external" href="https://docs.python.org/3/library/exceptions.html#Exception" title="(in Python v3.10)"><em>Exception</em></a><em>]</em>) – Reason will be <cite>None</cite> if the user initiated the shutdown,
141
+
<ddclass="field-odd"><p><strong>reason</strong> (<aclass="reference external" href="https://docs.python.org/3/library/typing.html#typing.Optional" title="(in Python v3.10)"><em>Optional</em></a><em>[</em><aclass="reference external" href="https://docs.python.org/3/library/exceptions.html#Exception" title="(in Python v3.10)"><em>Exception</em></a><em>]</em>) – Reason will be <cite>None</cite> if the user initiated the shutdown,
<li><p><strong>bootstrap</strong> (<aclass="reference external" href="https://awslabs.github.io/aws-crt-python/api/io.html#awscrt.io.ClientBootstrap" title="(in awscrt)"><em>awscrt.io.ClientBootstrap</em></a>) – ClientBootstrap to use when initiating socket connection.</p></li>
If None is provided, then the connection will be attempted over
252
252
plain-text.</p></li>
253
-
<li><p><strong>connect_message_amender</strong> (<em>Optional</em><em>[</em><em>Callable</em><em>[</em><em>[</em><em>]</em><em>, </em><aclass="reference internal" href="#awsiot.eventstreamrpc.MessageAmendment" title="awsiot.eventstreamrpc.MessageAmendment"><em>awsiot.eventstreamrpc.MessageAmendment</em></a><em>]</em><em>]</em>) – Optional callable that should return a
253
+
<li><p><strong>connect_message_amender</strong> (<aclass="reference external" href="https://docs.python.org/3/library/typing.html#typing.Optional" title="(in Python v3.10)"><em>Optional</em></a><em>[</em><aclass="reference external" href="https://docs.python.org/3/library/typing.html#typing.Callable" title="(in Python v3.10)"><em>Callable</em></a><em>[</em><em>[</em><em>]</em><em>, </em><aclass="reference internal" href="#awsiot.eventstreamrpc.MessageAmendment" title="awsiot.eventstreamrpc.MessageAmendment"><em>awsiot.eventstreamrpc.MessageAmendment</em></a><em>]</em><em>]</em>) – Optional callable that should return a
254
254
<aclass="reference internal" href="#awsiot.eventstreamrpc.MessageAmendment" title="awsiot.eventstreamrpc.MessageAmendment"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">MessageAmendment</span></code></a> for the
This callable will be invoked whenever a network connection is
@@ -292,7 +292,7 @@ <h3>Navigation</h3>
292
292
is already closed or closing.</p>
293
293
<dlclass="field-list simple">
294
294
<dtclass="field-odd">Parameters</dt>
295
-
<ddclass="field-odd"><p><strong>reason</strong> (<em>Optional</em><em>[</em><aclass="reference external" href="https://docs.python.org/3/library/exceptions.html#Exception" title="(in Python v3.10)"><em>Exception</em></a><em>]</em>) – If set, the connection will
295
+
<ddclass="field-odd"><p><strong>reason</strong> (<aclass="reference external" href="https://docs.python.org/3/library/typing.html#typing.Optional" title="(in Python v3.10)"><em>Optional</em></a><em>[</em><aclass="reference external" href="https://docs.python.org/3/library/exceptions.html#Exception" title="(in Python v3.10)"><em>Exception</em></a><em>]</em>) – If set, the connection will
296
296
close with this error as the reason (unless
297
297
it was already closing for another reason).</p>
298
298
</dd>
@@ -331,7 +331,7 @@ <h3>Navigation</h3>
331
331
<p>Catalog of all shapes serialized by this service</p>
0 commit comments