grpc.framework.alpha.html 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915
  1. <!DOCTYPE html>
  2. <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
  3. <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
  4. <head>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>grpc.framework.alpha package &mdash; grpcio 0.11.0b0 documentation</title>
  8. <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  9. <link rel="top" title="grpcio 0.11.0b0 documentation" href="index.html"/>
  10. <link rel="up" title="grpc.framework package" href="grpc.framework.html"/>
  11. <link rel="next" title="grpc.framework.base package" href="grpc.framework.base.html"/>
  12. <link rel="prev" title="grpc.framework package" href="grpc.framework.html"/>
  13. <script src="_static/js/modernizr.min.js"></script>
  14. </head>
  15. <body class="wy-body-for-nav" role="document">
  16. <div class="wy-grid-for-nav">
  17. <nav data-toggle="wy-nav-shift" class="wy-nav-side">
  18. <div class="wy-side-nav-search">
  19. <a href="index.html" class="icon icon-home"> grpcio
  20. </a>
  21. <div role="search">
  22. <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
  23. <input type="text" name="q" placeholder="Search docs" />
  24. <input type="hidden" name="check_keywords" value="yes" />
  25. <input type="hidden" name="area" value="default" />
  26. </form>
  27. </div>
  28. </div>
  29. <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
  30. <ul class="current">
  31. <li class="toctree-l1 current"><a class="reference internal" href="grpc.html">grpc package</a><ul class="current">
  32. <li class="toctree-l2 current"><a class="reference internal" href="grpc.html#subpackages">Subpackages</a><ul class="current">
  33. <li class="toctree-l3"><a class="reference internal" href="grpc.beta.html">grpc.beta package</a><ul>
  34. <li class="toctree-l4"><a class="reference internal" href="grpc.beta.html#submodules">Submodules</a></li>
  35. <li class="toctree-l4"><a class="reference internal" href="grpc.beta.html#module-grpc.beta.implementations">grpc.beta.implementations module</a></li>
  36. <li class="toctree-l4"><a class="reference internal" href="grpc.beta.html#module-grpc.beta.interfaces">grpc.beta.interfaces module</a></li>
  37. <li class="toctree-l4"><a class="reference internal" href="grpc.beta.html#module-grpc.beta.utilities">grpc.beta.utilities module</a></li>
  38. <li class="toctree-l4"><a class="reference internal" href="grpc.beta.html#module-grpc.beta">Module contents</a></li>
  39. </ul>
  40. </li>
  41. <li class="toctree-l3"><a class="reference internal" href="grpc.early_adopter.html">grpc.early_adopter package</a><ul>
  42. <li class="toctree-l4"><a class="reference internal" href="grpc.early_adopter.html#submodules">Submodules</a></li>
  43. <li class="toctree-l4"><a class="reference internal" href="grpc.early_adopter.html#module-grpc.early_adopter.implementations">grpc.early_adopter.implementations module</a></li>
  44. <li class="toctree-l4"><a class="reference internal" href="grpc.early_adopter.html#module-grpc.early_adopter">Module contents</a></li>
  45. </ul>
  46. </li>
  47. <li class="toctree-l3 current"><a class="reference internal" href="grpc.framework.html">grpc.framework package</a><ul class="current">
  48. <li class="toctree-l4 current"><a class="reference internal" href="grpc.framework.html#subpackages">Subpackages</a></li>
  49. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.html#module-grpc.framework">Module contents</a></li>
  50. </ul>
  51. </li>
  52. </ul>
  53. </li>
  54. <li class="toctree-l2"><a class="reference internal" href="grpc.html#module-grpc">Module contents</a></li>
  55. </ul>
  56. </li>
  57. </ul>
  58. </div>
  59. &nbsp;
  60. </nav>
  61. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
  62. <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
  63. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  64. <a href="index.html">grpcio</a>
  65. </nav>
  66. <div class="wy-nav-content">
  67. <div class="rst-content">
  68. <div role="navigation" aria-label="breadcrumbs navigation">
  69. <ul class="wy-breadcrumbs">
  70. <li><a href="index.html">Docs</a> &raquo;</li>
  71. <li><a href="grpc.html">grpc package</a> &raquo;</li>
  72. <li><a href="grpc.framework.html">grpc.framework package</a> &raquo;</li>
  73. <li>grpc.framework.alpha package</li>
  74. <li class="wy-breadcrumbs-aside">
  75. <a href="_sources/grpc.framework.alpha.txt" rel="nofollow"> View page source</a>
  76. </li>
  77. </ul>
  78. <hr/>
  79. </div>
  80. <div role="main" class="document">
  81. <div class="section" id="grpc-framework-alpha-package">
  82. <h1>grpc.framework.alpha package<a class="headerlink" href="#grpc-framework-alpha-package" title="Permalink to this headline">¶</a></h1>
  83. <div class="section" id="submodules">
  84. <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2>
  85. </div>
  86. <div class="section" id="module-grpc.framework.alpha.exceptions">
  87. <span id="grpc-framework-alpha-exceptions-module"></span><h2>grpc.framework.alpha.exceptions module<a class="headerlink" href="#module-grpc.framework.alpha.exceptions" title="Permalink to this headline">¶</a></h2>
  88. <p>Exceptions raised by GRPC.</p>
  89. <p>Only GRPC should instantiate and raise these exceptions.</p>
  90. <dl class="exception">
  91. <dt id="grpc.framework.alpha.exceptions.CancellationError">
  92. <em class="property">exception </em><code class="descclassname">grpc.framework.alpha.exceptions.</code><code class="descname">CancellationError</code><a class="reference internal" href="_modules/grpc/framework/alpha/exceptions.html#CancellationError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.exceptions.CancellationError" title="Permalink to this definition">¶</a></dt>
  93. <dd><p>Bases: <a class="reference internal" href="#grpc.framework.alpha.exceptions.RpcError" title="grpc.framework.alpha.exceptions.RpcError"><code class="xref py py-class docutils literal"><span class="pre">grpc.framework.alpha.exceptions.RpcError</span></code></a></p>
  94. <p>Indicates that an RPC has been cancelled.</p>
  95. </dd></dl>
  96. <dl class="exception">
  97. <dt id="grpc.framework.alpha.exceptions.ExpirationError">
  98. <em class="property">exception </em><code class="descclassname">grpc.framework.alpha.exceptions.</code><code class="descname">ExpirationError</code><a class="reference internal" href="_modules/grpc/framework/alpha/exceptions.html#ExpirationError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.exceptions.ExpirationError" title="Permalink to this definition">¶</a></dt>
  99. <dd><p>Bases: <a class="reference internal" href="#grpc.framework.alpha.exceptions.RpcError" title="grpc.framework.alpha.exceptions.RpcError"><code class="xref py py-class docutils literal"><span class="pre">grpc.framework.alpha.exceptions.RpcError</span></code></a></p>
  100. <p>Indicates that an RPC has expired (&#8220;timed out&#8221;).</p>
  101. </dd></dl>
  102. <dl class="exception">
  103. <dt id="grpc.framework.alpha.exceptions.RpcError">
  104. <em class="property">exception </em><code class="descclassname">grpc.framework.alpha.exceptions.</code><code class="descname">RpcError</code><a class="reference internal" href="_modules/grpc/framework/alpha/exceptions.html#RpcError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.exceptions.RpcError" title="Permalink to this definition">¶</a></dt>
  105. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></code></p>
  106. <p>Common super type for all exceptions raised by GRPC.</p>
  107. </dd></dl>
  108. </div>
  109. <div class="section" id="module-grpc.framework.alpha.interfaces">
  110. <span id="grpc-framework-alpha-interfaces-module"></span><h2>grpc.framework.alpha.interfaces module<a class="headerlink" href="#module-grpc.framework.alpha.interfaces" title="Permalink to this headline">¶</a></h2>
  111. <p>Interfaces of GRPC.</p>
  112. <dl class="class">
  113. <dt id="grpc.framework.alpha.interfaces.Abortion">
  114. <em class="property">class </em><code class="descclassname">grpc.framework.alpha.interfaces.</code><code class="descname">Abortion</code><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#Abortion"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.Abortion" title="Permalink to this definition">¶</a></dt>
  115. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">enum.Enum</span></code></p>
  116. <p>Categories of RPC abortion.</p>
  117. </dd></dl>
  118. <dl class="class">
  119. <dt id="grpc.framework.alpha.interfaces.CancellableIterator">
  120. <em class="property">class </em><code class="descclassname">grpc.framework.alpha.interfaces.</code><code class="descname">CancellableIterator</code><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#CancellableIterator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.CancellableIterator" title="Permalink to this definition">¶</a></dt>
  121. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  122. <p>Implements the Iterator protocol and affords a cancel method.</p>
  123. <dl class="method">
  124. <dt id="grpc.framework.alpha.interfaces.CancellableIterator.__iter__">
  125. <code class="descname">__iter__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#CancellableIterator.__iter__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.CancellableIterator.__iter__" title="Permalink to this definition">¶</a></dt>
  126. <dd><p>Returns the self object in accordance with the Iterator protocol.</p>
  127. </dd></dl>
  128. <dl class="method">
  129. <dt id="grpc.framework.alpha.interfaces.CancellableIterator.cancel">
  130. <code class="descname">cancel</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#CancellableIterator.cancel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.CancellableIterator.cancel" title="Permalink to this definition">¶</a></dt>
  131. <dd><p>Requests cancellation of whatever computation underlies this iterator.</p>
  132. </dd></dl>
  133. <dl class="method">
  134. <dt id="grpc.framework.alpha.interfaces.CancellableIterator.next">
  135. <code class="descname">next</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#CancellableIterator.next"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.CancellableIterator.next" title="Permalink to this definition">¶</a></dt>
  136. <dd><p>Returns a value or raises StopIteration per the Iterator protocol.</p>
  137. </dd></dl>
  138. </dd></dl>
  139. <dl class="class">
  140. <dt id="grpc.framework.alpha.interfaces.Cardinality">
  141. <em class="property">class </em><code class="descclassname">grpc.framework.alpha.interfaces.</code><code class="descname">Cardinality</code><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#Cardinality"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.Cardinality" title="Permalink to this definition">¶</a></dt>
  142. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">enum.Enum</span></code></p>
  143. <p>Constants for the four cardinalities of RPC.</p>
  144. </dd></dl>
  145. <dl class="class">
  146. <dt id="grpc.framework.alpha.interfaces.RpcContext">
  147. <em class="property">class </em><code class="descclassname">grpc.framework.alpha.interfaces.</code><code class="descname">RpcContext</code><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcContext"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcContext" title="Permalink to this definition">¶</a></dt>
  148. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  149. <p>Provides RPC-related information and action.</p>
  150. <dl class="method">
  151. <dt id="grpc.framework.alpha.interfaces.RpcContext.add_abortion_callback">
  152. <code class="descname">add_abortion_callback</code><span class="sig-paren">(</span><em>abortion_callback</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcContext.add_abortion_callback"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcContext.add_abortion_callback" title="Permalink to this definition">¶</a></dt>
  153. <dd><p>Registers a callback to be called if the RPC is aborted.
  154. :param abortion_callback: A callable to be called and passed an Abortion value</p>
  155. <blockquote>
  156. <div>in the event of RPC abortion.</div></blockquote>
  157. </dd></dl>
  158. <dl class="method">
  159. <dt id="grpc.framework.alpha.interfaces.RpcContext.is_active">
  160. <code class="descname">is_active</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcContext.is_active"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcContext.is_active" title="Permalink to this definition">¶</a></dt>
  161. <dd><p>Describes whether the RPC is active or has terminated.</p>
  162. </dd></dl>
  163. <dl class="method">
  164. <dt id="grpc.framework.alpha.interfaces.RpcContext.time_remaining">
  165. <code class="descname">time_remaining</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcContext.time_remaining"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcContext.time_remaining" title="Permalink to this definition">¶</a></dt>
  166. <dd><p>Describes the length of allowed time remaining for the RPC.
  167. :returns: A nonnegative float indicating the length of allowed time in seconds</p>
  168. <blockquote>
  169. <div>remaining for the RPC to complete before it is considered to have timed
  170. out.</div></blockquote>
  171. </dd></dl>
  172. </dd></dl>
  173. <dl class="class">
  174. <dt id="grpc.framework.alpha.interfaces.RpcMethodDescription">
  175. <em class="property">class </em><code class="descclassname">grpc.framework.alpha.interfaces.</code><code class="descname">RpcMethodDescription</code><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodDescription"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodDescription" title="Permalink to this definition">¶</a></dt>
  176. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  177. <p>A type for the common aspects of RPC method descriptions.</p>
  178. <dl class="method">
  179. <dt id="grpc.framework.alpha.interfaces.RpcMethodDescription.cardinality">
  180. <code class="descname">cardinality</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodDescription.cardinality"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodDescription.cardinality" title="Permalink to this definition">¶</a></dt>
  181. <dd><p>Identifies the cardinality of this RpcMethodDescription.</p>
  182. <table class="docutils field-list" frame="void" rules="none">
  183. <col class="field-name" />
  184. <col class="field-body" />
  185. <tbody valign="top">
  186. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A Cardinality value identifying whether or not this
  187. RpcMethodDescription is request-unary or request-streaming and
  188. whether or not it is response-unary or response-streaming.</td>
  189. </tr>
  190. </tbody>
  191. </table>
  192. </dd></dl>
  193. </dd></dl>
  194. <dl class="class">
  195. <dt id="grpc.framework.alpha.interfaces.RpcMethodInvocationDescription">
  196. <em class="property">class </em><code class="descclassname">grpc.framework.alpha.interfaces.</code><code class="descname">RpcMethodInvocationDescription</code><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodInvocationDescription"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodInvocationDescription" title="Permalink to this definition">¶</a></dt>
  197. <dd><p>Bases: <a class="reference internal" href="#grpc.framework.alpha.interfaces.RpcMethodDescription" title="grpc.framework.alpha.interfaces.RpcMethodDescription"><code class="xref py py-class docutils literal"><span class="pre">grpc.framework.alpha.interfaces.RpcMethodDescription</span></code></a></p>
  198. <p>Invocation-side description of an RPC method.</p>
  199. <dl class="method">
  200. <dt id="grpc.framework.alpha.interfaces.RpcMethodInvocationDescription.deserialize_response">
  201. <code class="descname">deserialize_response</code><span class="sig-paren">(</span><em>serialized_response</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodInvocationDescription.deserialize_response"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodInvocationDescription.deserialize_response" title="Permalink to this definition">¶</a></dt>
  202. <dd><p>Deserializes a response value.</p>
  203. <table class="docutils field-list" frame="void" rules="none">
  204. <col class="field-name" />
  205. <col class="field-body" />
  206. <tbody valign="top">
  207. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>serialized_response</strong> &#8211; A bytestring that is the serialization of a response
  208. value appropriate for the RPC method described by this
  209. RpcMethodInvocationDescription.</td>
  210. </tr>
  211. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A response value corresponding to the given bytestring.</td>
  212. </tr>
  213. </tbody>
  214. </table>
  215. </dd></dl>
  216. <dl class="method">
  217. <dt id="grpc.framework.alpha.interfaces.RpcMethodInvocationDescription.serialize_request">
  218. <code class="descname">serialize_request</code><span class="sig-paren">(</span><em>request</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodInvocationDescription.serialize_request"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodInvocationDescription.serialize_request" title="Permalink to this definition">¶</a></dt>
  219. <dd><p>Serializes a request value.</p>
  220. <table class="docutils field-list" frame="void" rules="none">
  221. <col class="field-name" />
  222. <col class="field-body" />
  223. <tbody valign="top">
  224. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>request</strong> &#8211; A request value appropriate for the RPC method described by this
  225. RpcMethodInvocationDescription.</td>
  226. </tr>
  227. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The serialization of the given request value as a
  228. bytestring.</td>
  229. </tr>
  230. </tbody>
  231. </table>
  232. </dd></dl>
  233. </dd></dl>
  234. <dl class="class">
  235. <dt id="grpc.framework.alpha.interfaces.RpcMethodServiceDescription">
  236. <em class="property">class </em><code class="descclassname">grpc.framework.alpha.interfaces.</code><code class="descname">RpcMethodServiceDescription</code><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodServiceDescription"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodServiceDescription" title="Permalink to this definition">¶</a></dt>
  237. <dd><p>Bases: <a class="reference internal" href="#grpc.framework.alpha.interfaces.RpcMethodDescription" title="grpc.framework.alpha.interfaces.RpcMethodDescription"><code class="xref py py-class docutils literal"><span class="pre">grpc.framework.alpha.interfaces.RpcMethodDescription</span></code></a></p>
  238. <p>Service-side description of an RPC method.</p>
  239. <dl class="method">
  240. <dt id="grpc.framework.alpha.interfaces.RpcMethodServiceDescription.deserialize_request">
  241. <code class="descname">deserialize_request</code><span class="sig-paren">(</span><em>serialized_request</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodServiceDescription.deserialize_request"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodServiceDescription.deserialize_request" title="Permalink to this definition">¶</a></dt>
  242. <dd><p>Deserializes a request value.</p>
  243. <table class="docutils field-list" frame="void" rules="none">
  244. <col class="field-name" />
  245. <col class="field-body" />
  246. <tbody valign="top">
  247. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>serialized_request</strong> &#8211; A bytestring that is the serialization of a request
  248. value appropriate for the RPC method described by this
  249. RpcMethodServiceDescription.</td>
  250. </tr>
  251. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A request value corresponding to the given bytestring.</td>
  252. </tr>
  253. </tbody>
  254. </table>
  255. </dd></dl>
  256. <dl class="method">
  257. <dt id="grpc.framework.alpha.interfaces.RpcMethodServiceDescription.serialize_response">
  258. <code class="descname">serialize_response</code><span class="sig-paren">(</span><em>response</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodServiceDescription.serialize_response"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodServiceDescription.serialize_response" title="Permalink to this definition">¶</a></dt>
  259. <dd><p>Serializes a response value.</p>
  260. <table class="docutils field-list" frame="void" rules="none">
  261. <col class="field-name" />
  262. <col class="field-body" />
  263. <tbody valign="top">
  264. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>response</strong> &#8211; A response value appropriate for the RPC method described by
  265. this RpcMethodServiceDescription.</td>
  266. </tr>
  267. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The serialization of the given response value as a
  268. bytestring.</td>
  269. </tr>
  270. </tbody>
  271. </table>
  272. </dd></dl>
  273. <dl class="method">
  274. <dt id="grpc.framework.alpha.interfaces.RpcMethodServiceDescription.service_stream_stream">
  275. <code class="descname">service_stream_stream</code><span class="sig-paren">(</span><em>request_iterator</em>, <em>context</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodServiceDescription.service_stream_stream"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodServiceDescription.service_stream_stream" title="Permalink to this definition">¶</a></dt>
  276. <dd><p>Carries out this RPC.</p>
  277. <p>This method may only be called if the cardinality of this
  278. RpcMethodServiceDescription is Cardinality.STREAM_STREAM.</p>
  279. <table class="docutils field-list" frame="void" rules="none">
  280. <col class="field-name" />
  281. <col class="field-body" />
  282. <tbody valign="top">
  283. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  284. <li><strong>request_iterator</strong> &#8211; An iterator of request values appropriate for the RPC
  285. method described by this RpcMethodServiceDescription.</li>
  286. <li><strong>context</strong> &#8211; An RpcContext object for the RPC.</li>
  287. </ul>
  288. </td>
  289. </tr>
  290. <tr class="field-even field"><th class="field-name">Yields:</th><td class="field-body"><p class="first last">Zero or more response values appropriate for the RPC method described by
  291. this RpcMethodServiceDescription.</p>
  292. </td>
  293. </tr>
  294. </tbody>
  295. </table>
  296. </dd></dl>
  297. <dl class="method">
  298. <dt id="grpc.framework.alpha.interfaces.RpcMethodServiceDescription.service_stream_unary">
  299. <code class="descname">service_stream_unary</code><span class="sig-paren">(</span><em>request_iterator</em>, <em>context</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodServiceDescription.service_stream_unary"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodServiceDescription.service_stream_unary" title="Permalink to this definition">¶</a></dt>
  300. <dd><p>Carries out this RPC.</p>
  301. <p>This method may only be called if the cardinality of this
  302. RpcMethodServiceDescription is Cardinality.STREAM_UNARY.</p>
  303. <table class="docutils field-list" frame="void" rules="none">
  304. <col class="field-name" />
  305. <col class="field-body" />
  306. <tbody valign="top">
  307. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  308. <li><strong>request_iterator</strong> &#8211; An iterator of request values appropriate for the RPC
  309. method described by this RpcMethodServiceDescription.</li>
  310. <li><strong>context</strong> &#8211; An RpcContext object for the RPC.</li>
  311. </ul>
  312. </td>
  313. </tr>
  314. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A response value appropriate for the RPC method described by this
  315. RpcMethodServiceDescription.</p>
  316. </td>
  317. </tr>
  318. </tbody>
  319. </table>
  320. </dd></dl>
  321. <dl class="method">
  322. <dt id="grpc.framework.alpha.interfaces.RpcMethodServiceDescription.service_unary_stream">
  323. <code class="descname">service_unary_stream</code><span class="sig-paren">(</span><em>request</em>, <em>context</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodServiceDescription.service_unary_stream"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodServiceDescription.service_unary_stream" title="Permalink to this definition">¶</a></dt>
  324. <dd><p>Carries out this RPC.</p>
  325. <p>This method may only be called if the cardinality of this
  326. RpcMethodServiceDescription is Cardinality.UNARY_STREAM.</p>
  327. <table class="docutils field-list" frame="void" rules="none">
  328. <col class="field-name" />
  329. <col class="field-body" />
  330. <tbody valign="top">
  331. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  332. <li><strong>request</strong> &#8211; A request value appropriate for the RPC method described by this
  333. RpcMethodServiceDescription.</li>
  334. <li><strong>context</strong> &#8211; An RpcContext object for the RPC.</li>
  335. </ul>
  336. </td>
  337. </tr>
  338. <tr class="field-even field"><th class="field-name">Yields:</th><td class="field-body"><p class="first last">Zero or more response values appropriate for the RPC method described by
  339. this RpcMethodServiceDescription.</p>
  340. </td>
  341. </tr>
  342. </tbody>
  343. </table>
  344. </dd></dl>
  345. <dl class="method">
  346. <dt id="grpc.framework.alpha.interfaces.RpcMethodServiceDescription.service_unary_unary">
  347. <code class="descname">service_unary_unary</code><span class="sig-paren">(</span><em>request</em>, <em>context</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodServiceDescription.service_unary_unary"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodServiceDescription.service_unary_unary" title="Permalink to this definition">¶</a></dt>
  348. <dd><p>Carries out this RPC.</p>
  349. <p>This method may only be called if the cardinality of this
  350. RpcMethodServiceDescription is Cardinality.UNARY_UNARY.</p>
  351. <table class="docutils field-list" frame="void" rules="none">
  352. <col class="field-name" />
  353. <col class="field-body" />
  354. <tbody valign="top">
  355. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  356. <li><strong>request</strong> &#8211; A request value appropriate for the RPC method described by this
  357. RpcMethodServiceDescription.</li>
  358. <li><strong>context</strong> &#8211; An RpcContext object for the RPC.</li>
  359. </ul>
  360. </td>
  361. </tr>
  362. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A response value appropriate for the RPC method described by this
  363. RpcMethodServiceDescription.</p>
  364. </td>
  365. </tr>
  366. </tbody>
  367. </table>
  368. </dd></dl>
  369. </dd></dl>
  370. <dl class="class">
  371. <dt id="grpc.framework.alpha.interfaces.Server">
  372. <em class="property">class </em><code class="descclassname">grpc.framework.alpha.interfaces.</code><code class="descname">Server</code><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#Server"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.Server" title="Permalink to this definition">¶</a></dt>
  373. <dd><p>Bases: <a class="reference internal" href="grpc.framework.foundation.html#grpc.framework.foundation.activated.Activated" title="grpc.framework.foundation.activated.Activated"><code class="xref py py-class docutils literal"><span class="pre">grpc.framework.foundation.activated.Activated</span></code></a></p>
  374. <p>A GRPC Server.</p>
  375. <dl class="method">
  376. <dt id="grpc.framework.alpha.interfaces.Server.port">
  377. <code class="descname">port</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#Server.port"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.Server.port" title="Permalink to this definition">¶</a></dt>
  378. <dd><p>Reports the port on which the server is serving.</p>
  379. <p>This method may only be called while the server is activated.</p>
  380. <table class="docutils field-list" frame="void" rules="none">
  381. <col class="field-name" />
  382. <col class="field-body" />
  383. <tbody valign="top">
  384. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The port on which the server is serving.</td>
  385. </tr>
  386. </tbody>
  387. </table>
  388. </dd></dl>
  389. </dd></dl>
  390. <dl class="class">
  391. <dt id="grpc.framework.alpha.interfaces.StreamUnarySyncAsync">
  392. <em class="property">class </em><code class="descclassname">grpc.framework.alpha.interfaces.</code><code class="descname">StreamUnarySyncAsync</code><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#StreamUnarySyncAsync"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.StreamUnarySyncAsync" title="Permalink to this definition">¶</a></dt>
  393. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  394. <p>Affords invoking a stream-unary RPC synchronously or asynchronously.
  395. Values implementing this interface are directly callable and present an
  396. &#8220;async&#8221; method. Both calls take an iterator of request values and a numeric
  397. timeout. Direct invocation of a value of this type invokes its associated RPC
  398. and blocks until the RPC&#8217;s response is available. Calling the &#8220;async&#8221; method
  399. of a value of this type invokes its associated RPC and immediately returns a
  400. future.Future bound to the asynchronous execution of the RPC.</p>
  401. <dl class="method">
  402. <dt id="grpc.framework.alpha.interfaces.StreamUnarySyncAsync.__call__">
  403. <code class="descname">__call__</code><span class="sig-paren">(</span><em>request_iterator</em>, <em>timeout</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#StreamUnarySyncAsync.__call__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.StreamUnarySyncAsync.__call__" title="Permalink to this definition">¶</a></dt>
  404. <dd><p>Synchronously invokes the underlying RPC.</p>
  405. <table class="docutils field-list" frame="void" rules="none">
  406. <col class="field-name" />
  407. <col class="field-body" />
  408. <tbody valign="top">
  409. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  410. <li><strong>request_iterator</strong> &#8211; An iterator that yields request values for the RPC.</li>
  411. <li><strong>timeout</strong> &#8211; A duration of time in seconds to allow for the RPC.</li>
  412. </ul>
  413. </td>
  414. </tr>
  415. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The response value for the RPC.</p>
  416. </td>
  417. </tr>
  418. <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><code class="xref py py-exc docutils literal"><span class="pre">exceptions.RpcError</span></code> &#8211;
  419. Indicating that the RPC was aborted.</p>
  420. </td>
  421. </tr>
  422. </tbody>
  423. </table>
  424. </dd></dl>
  425. <dl class="method">
  426. <dt id="grpc.framework.alpha.interfaces.StreamUnarySyncAsync.async">
  427. <code class="descname">async</code><span class="sig-paren">(</span><em>request_iterator</em>, <em>timeout</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#StreamUnarySyncAsync.async"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.StreamUnarySyncAsync.async" title="Permalink to this definition">¶</a></dt>
  428. <dd><p>Asynchronously invokes the underlying RPC.</p>
  429. <table class="docutils field-list" frame="void" rules="none">
  430. <col class="field-name" />
  431. <col class="field-body" />
  432. <tbody valign="top">
  433. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  434. <li><strong>request_iterator</strong> &#8211; An iterator that yields request values for the RPC.</li>
  435. <li><strong>timeout</strong> &#8211; A duration of time in seconds to allow for the RPC.</li>
  436. </ul>
  437. </td>
  438. </tr>
  439. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A future.Future representing the RPC. In the event of RPC completion, the
  440. returned Future&#8217;s result value will be the response value of the RPC.
  441. In the event of RPC abortion, the returned Future&#8217;s exception value
  442. will be an exceptions.RpcError.</p>
  443. </td>
  444. </tr>
  445. </tbody>
  446. </table>
  447. </dd></dl>
  448. </dd></dl>
  449. <dl class="class">
  450. <dt id="grpc.framework.alpha.interfaces.Stub">
  451. <em class="property">class </em><code class="descclassname">grpc.framework.alpha.interfaces.</code><code class="descname">Stub</code><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#Stub"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.Stub" title="Permalink to this definition">¶</a></dt>
  452. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  453. <p>A stub with callable RPC method names for attributes.</p>
  454. <p>Instances of this type are context managers and only afford RPC invocation
  455. when used in context.</p>
  456. <p>Instances of this type, when used in context, respond to attribute access
  457. as follows: if the requested attribute is the name of a unary-unary RPC
  458. method, the value of the attribute will be a UnaryUnarySyncAsync with which
  459. to invoke the RPC method. If the requested attribute is the name of a
  460. unary-stream RPC method, the value of the attribute will be a callable taking
  461. a request object and a timeout parameter and returning a CancellableIterator
  462. that yields the response values of the RPC. If the requested attribute is the
  463. name of a stream-unary RPC method, the value of the attribute will be a
  464. StreamUnarySyncAsync with which to invoke the RPC method. If the requested
  465. attribute is the name of a stream-stream RPC method, the value of the
  466. attribute will be a callable taking an iterator of request objects and a
  467. timeout and returning a CancellableIterator that yields the response values
  468. of the RPC.</p>
  469. <p>In all cases indication of abortion is indicated by raising of
  470. exceptions.RpcError, exceptions.CancellationError,
  471. and exceptions.ExpirationError.</p>
  472. </dd></dl>
  473. <dl class="class">
  474. <dt id="grpc.framework.alpha.interfaces.UnaryUnarySyncAsync">
  475. <em class="property">class </em><code class="descclassname">grpc.framework.alpha.interfaces.</code><code class="descname">UnaryUnarySyncAsync</code><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#UnaryUnarySyncAsync"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.UnaryUnarySyncAsync" title="Permalink to this definition">¶</a></dt>
  476. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  477. <p>Affords invoking a unary-unary RPC synchronously or asynchronously.
  478. Values implementing this interface are directly callable and present an
  479. &#8220;async&#8221; method. Both calls take a request value and a numeric timeout.
  480. Direct invocation of a value of this type invokes its associated RPC and
  481. blocks until the RPC&#8217;s response is available. Calling the &#8220;async&#8221; method
  482. of a value of this type invokes its associated RPC and immediately returns a
  483. future.Future bound to the asynchronous execution of the RPC.</p>
  484. <dl class="method">
  485. <dt id="grpc.framework.alpha.interfaces.UnaryUnarySyncAsync.__call__">
  486. <code class="descname">__call__</code><span class="sig-paren">(</span><em>request</em>, <em>timeout</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#UnaryUnarySyncAsync.__call__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.UnaryUnarySyncAsync.__call__" title="Permalink to this definition">¶</a></dt>
  487. <dd><p>Synchronously invokes the underlying RPC.
  488. :param request: The request value for the RPC.
  489. :param timeout: A duration of time in seconds to allow for the RPC.</p>
  490. <table class="docutils field-list" frame="void" rules="none">
  491. <col class="field-name" />
  492. <col class="field-body" />
  493. <tbody valign="top">
  494. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The response value for the RPC.</td>
  495. </tr>
  496. <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><code class="xref py py-exc docutils literal"><span class="pre">exceptions.RpcError</span></code> &#8211;
  497. Indicating that the RPC was aborted.</td>
  498. </tr>
  499. </tbody>
  500. </table>
  501. </dd></dl>
  502. <dl class="method">
  503. <dt id="grpc.framework.alpha.interfaces.UnaryUnarySyncAsync.async">
  504. <code class="descname">async</code><span class="sig-paren">(</span><em>request</em>, <em>timeout</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#UnaryUnarySyncAsync.async"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.UnaryUnarySyncAsync.async" title="Permalink to this definition">¶</a></dt>
  505. <dd><p>Asynchronously invokes the underlying RPC.
  506. :param request: The request value for the RPC.
  507. :param timeout: A duration of time in seconds to allow for the RPC.</p>
  508. <table class="docutils field-list" frame="void" rules="none">
  509. <col class="field-name" />
  510. <col class="field-body" />
  511. <tbody valign="top">
  512. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A future.Future representing the RPC. In the event of RPC completion, the
  513. returned Future&#8217;s result value will be the response value of the RPC.
  514. In the event of RPC abortion, the returned Future&#8217;s exception value
  515. will be an exceptions.RpcError.</td>
  516. </tr>
  517. </tbody>
  518. </table>
  519. </dd></dl>
  520. </dd></dl>
  521. </div>
  522. <div class="section" id="module-grpc.framework.alpha.utilities">
  523. <span id="grpc-framework-alpha-utilities-module"></span><h2>grpc.framework.alpha.utilities module<a class="headerlink" href="#module-grpc.framework.alpha.utilities" title="Permalink to this headline">¶</a></h2>
  524. <p>Utilities for use with GRPC.</p>
  525. <dl class="function">
  526. <dt id="grpc.framework.alpha.utilities.stream_stream_invocation_description">
  527. <code class="descclassname">grpc.framework.alpha.utilities.</code><code class="descname">stream_stream_invocation_description</code><span class="sig-paren">(</span><em>request_serializer</em>, <em>response_deserializer</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/utilities.html#stream_stream_invocation_description"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.utilities.stream_stream_invocation_description" title="Permalink to this definition">¶</a></dt>
  528. <dd><p>Creates an interfaces.RpcMethodInvocationDescription for an RPC method.</p>
  529. <table class="docutils field-list" frame="void" rules="none">
  530. <col class="field-name" />
  531. <col class="field-body" />
  532. <tbody valign="top">
  533. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  534. <li><strong>request_serializer</strong> &#8211; A callable that when called on a request
  535. value returns a bytestring corresponding to that value.</li>
  536. <li><strong>response_deserializer</strong> &#8211; A callable that when called on a
  537. bytestring returns the response value corresponding to
  538. that bytestring.</li>
  539. </ul>
  540. </td>
  541. </tr>
  542. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">An interfaces.RpcMethodInvocationDescription constructed from the given
  543. arguments representing a streaming-request/streaming-response RPC
  544. method.</p>
  545. </td>
  546. </tr>
  547. </tbody>
  548. </table>
  549. </dd></dl>
  550. <dl class="function">
  551. <dt id="grpc.framework.alpha.utilities.stream_stream_service_description">
  552. <code class="descclassname">grpc.framework.alpha.utilities.</code><code class="descname">stream_stream_service_description</code><span class="sig-paren">(</span><em>behavior</em>, <em>request_deserializer</em>, <em>response_serializer</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/utilities.html#stream_stream_service_description"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.utilities.stream_stream_service_description" title="Permalink to this definition">¶</a></dt>
  553. <dd><p>Creates an interfaces.RpcMethodServiceDescription for the given behavior.</p>
  554. <table class="docutils field-list" frame="void" rules="none">
  555. <col class="field-name" />
  556. <col class="field-body" />
  557. <tbody valign="top">
  558. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  559. <li><strong>behavior</strong> &#8211; A callable that implements a stream-stream RPC
  560. method that accepts an iterator of zero or more requests
  561. and an interfaces.RpcContext and returns an iterator of
  562. zero or more responses.</li>
  563. <li><strong>request_deserializer</strong> &#8211; A callable that when called on a
  564. bytestring returns the request value corresponding to that
  565. bytestring.</li>
  566. <li><strong>response_serializer</strong> &#8211; A callable that when called on a
  567. response value returns the bytestring corresponding to
  568. that value.</li>
  569. </ul>
  570. </td>
  571. </tr>
  572. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">An interfaces.RpcMethodServiceDescription constructed from the given
  573. arguments representing a
  574. streaming-request/streaming-response RPC method.</p>
  575. </td>
  576. </tr>
  577. </tbody>
  578. </table>
  579. </dd></dl>
  580. <dl class="function">
  581. <dt id="grpc.framework.alpha.utilities.stream_unary_invocation_description">
  582. <code class="descclassname">grpc.framework.alpha.utilities.</code><code class="descname">stream_unary_invocation_description</code><span class="sig-paren">(</span><em>request_serializer</em>, <em>response_deserializer</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/utilities.html#stream_unary_invocation_description"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.utilities.stream_unary_invocation_description" title="Permalink to this definition">¶</a></dt>
  583. <dd><p>Creates an interfaces.RpcMethodInvocationDescription for an RPC method.</p>
  584. <table class="docutils field-list" frame="void" rules="none">
  585. <col class="field-name" />
  586. <col class="field-body" />
  587. <tbody valign="top">
  588. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  589. <li><strong>request_serializer</strong> &#8211; A callable that when called on a request
  590. value returns a bytestring corresponding to that value.</li>
  591. <li><strong>response_deserializer</strong> &#8211; A callable that when called on a
  592. bytestring returns the response value corresponding to
  593. that bytestring.</li>
  594. </ul>
  595. </td>
  596. </tr>
  597. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">An interfaces.RpcMethodInvocationDescription constructed from the given
  598. arguments representing a streaming-request/unary-response RPC method.</p>
  599. </td>
  600. </tr>
  601. </tbody>
  602. </table>
  603. </dd></dl>
  604. <dl class="function">
  605. <dt id="grpc.framework.alpha.utilities.stream_unary_service_description">
  606. <code class="descclassname">grpc.framework.alpha.utilities.</code><code class="descname">stream_unary_service_description</code><span class="sig-paren">(</span><em>behavior</em>, <em>request_deserializer</em>, <em>response_serializer</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/utilities.html#stream_unary_service_description"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.utilities.stream_unary_service_description" title="Permalink to this definition">¶</a></dt>
  607. <dd><p>Creates an interfaces.RpcMethodServiceDescription for the given behavior.</p>
  608. <table class="docutils field-list" frame="void" rules="none">
  609. <col class="field-name" />
  610. <col class="field-body" />
  611. <tbody valign="top">
  612. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  613. <li><strong>behavior</strong> &#8211; A callable that implements a stream-unary RPC
  614. method that accepts an iterator of zero or more requests
  615. and an interfaces.RpcContext and returns a single response.</li>
  616. <li><strong>request_deserializer</strong> &#8211; A callable that when called on a
  617. bytestring returns the request value corresponding to that
  618. bytestring.</li>
  619. <li><strong>response_serializer</strong> &#8211; A callable that when called on a
  620. response value returns the bytestring corresponding to
  621. that value.</li>
  622. </ul>
  623. </td>
  624. </tr>
  625. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">An interfaces.RpcMethodServiceDescription constructed from the given
  626. arguments representing a streaming-request/unary-response
  627. RPC method.</p>
  628. </td>
  629. </tr>
  630. </tbody>
  631. </table>
  632. </dd></dl>
  633. <dl class="function">
  634. <dt id="grpc.framework.alpha.utilities.unary_stream_invocation_description">
  635. <code class="descclassname">grpc.framework.alpha.utilities.</code><code class="descname">unary_stream_invocation_description</code><span class="sig-paren">(</span><em>request_serializer</em>, <em>response_deserializer</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/utilities.html#unary_stream_invocation_description"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.utilities.unary_stream_invocation_description" title="Permalink to this definition">¶</a></dt>
  636. <dd><p>Creates an interfaces.RpcMethodInvocationDescription for an RPC method.</p>
  637. <table class="docutils field-list" frame="void" rules="none">
  638. <col class="field-name" />
  639. <col class="field-body" />
  640. <tbody valign="top">
  641. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  642. <li><strong>request_serializer</strong> &#8211; A callable that when called on a request
  643. value returns a bytestring corresponding to that value.</li>
  644. <li><strong>response_deserializer</strong> &#8211; A callable that when called on a
  645. bytestring returns the response value corresponding to
  646. that bytestring.</li>
  647. </ul>
  648. </td>
  649. </tr>
  650. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">An interfaces.RpcMethodInvocationDescription constructed from the given
  651. arguments representing a unary-request/streaming-response RPC method.</p>
  652. </td>
  653. </tr>
  654. </tbody>
  655. </table>
  656. </dd></dl>
  657. <dl class="function">
  658. <dt id="grpc.framework.alpha.utilities.unary_stream_service_description">
  659. <code class="descclassname">grpc.framework.alpha.utilities.</code><code class="descname">unary_stream_service_description</code><span class="sig-paren">(</span><em>behavior</em>, <em>request_deserializer</em>, <em>response_serializer</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/utilities.html#unary_stream_service_description"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.utilities.unary_stream_service_description" title="Permalink to this definition">¶</a></dt>
  660. <dd><p>Creates an interfaces.RpcMethodServiceDescription for the given behavior.</p>
  661. <table class="docutils field-list" frame="void" rules="none">
  662. <col class="field-name" />
  663. <col class="field-body" />
  664. <tbody valign="top">
  665. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  666. <li><strong>behavior</strong> &#8211; A callable that implements a unary-stream RPC
  667. method that accepts a single request and an interfaces.RpcContext
  668. and returns an iterator of zero or more responses.</li>
  669. <li><strong>request_deserializer</strong> &#8211; A callable that when called on a
  670. bytestring returns the request value corresponding to that
  671. bytestring.</li>
  672. <li><strong>response_serializer</strong> &#8211; A callable that when called on a
  673. response value returns the bytestring corresponding to
  674. that value.</li>
  675. </ul>
  676. </td>
  677. </tr>
  678. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">An interfaces.RpcMethodServiceDescription constructed from the given
  679. arguments representing a unary-request/streaming-response
  680. RPC method.</p>
  681. </td>
  682. </tr>
  683. </tbody>
  684. </table>
  685. </dd></dl>
  686. <dl class="function">
  687. <dt id="grpc.framework.alpha.utilities.unary_unary_invocation_description">
  688. <code class="descclassname">grpc.framework.alpha.utilities.</code><code class="descname">unary_unary_invocation_description</code><span class="sig-paren">(</span><em>request_serializer</em>, <em>response_deserializer</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/utilities.html#unary_unary_invocation_description"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.utilities.unary_unary_invocation_description" title="Permalink to this definition">¶</a></dt>
  689. <dd><p>Creates an interfaces.RpcMethodInvocationDescription for an RPC method.</p>
  690. <table class="docutils field-list" frame="void" rules="none">
  691. <col class="field-name" />
  692. <col class="field-body" />
  693. <tbody valign="top">
  694. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  695. <li><strong>request_serializer</strong> &#8211; A callable that when called on a request
  696. value returns a bytestring corresponding to that value.</li>
  697. <li><strong>response_deserializer</strong> &#8211; A callable that when called on a
  698. bytestring returns the response value corresponding to
  699. that bytestring.</li>
  700. </ul>
  701. </td>
  702. </tr>
  703. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">An interfaces.RpcMethodInvocationDescription constructed from the given
  704. arguments representing a unary-request/unary-response RPC method.</p>
  705. </td>
  706. </tr>
  707. </tbody>
  708. </table>
  709. </dd></dl>
  710. <dl class="function">
  711. <dt id="grpc.framework.alpha.utilities.unary_unary_service_description">
  712. <code class="descclassname">grpc.framework.alpha.utilities.</code><code class="descname">unary_unary_service_description</code><span class="sig-paren">(</span><em>behavior</em>, <em>request_deserializer</em>, <em>response_serializer</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/utilities.html#unary_unary_service_description"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.utilities.unary_unary_service_description" title="Permalink to this definition">¶</a></dt>
  713. <dd><p>Creates an interfaces.RpcMethodServiceDescription for the given behavior.</p>
  714. <table class="docutils field-list" frame="void" rules="none">
  715. <col class="field-name" />
  716. <col class="field-body" />
  717. <tbody valign="top">
  718. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  719. <li><strong>behavior</strong> &#8211; A callable that implements a unary-unary RPC
  720. method that accepts a single request and an interfaces.RpcContext and
  721. returns a single response.</li>
  722. <li><strong>request_deserializer</strong> &#8211; A callable that when called on a
  723. bytestring returns the request value corresponding to that
  724. bytestring.</li>
  725. <li><strong>response_serializer</strong> &#8211; A callable that when called on a
  726. response value returns the bytestring corresponding to
  727. that value.</li>
  728. </ul>
  729. </td>
  730. </tr>
  731. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">An interfaces.RpcMethodServiceDescription constructed from the given
  732. arguments representing a unary-request/unary-response RPC
  733. method.</p>
  734. </td>
  735. </tr>
  736. </tbody>
  737. </table>
  738. </dd></dl>
  739. </div>
  740. <div class="section" id="module-grpc.framework.alpha">
  741. <span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-grpc.framework.alpha" title="Permalink to this headline">¶</a></h2>
  742. </div>
  743. </div>
  744. </div>
  745. <footer>
  746. <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
  747. <a href="grpc.framework.base.html" class="btn btn-neutral float-right" title="grpc.framework.base package" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
  748. <a href="grpc.framework.html" class="btn btn-neutral" title="grpc.framework package" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
  749. </div>
  750. <hr/>
  751. <div role="contentinfo">
  752. <p>
  753. &copy; Copyright 2015, Author.
  754. </p>
  755. </div>
  756. Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
  757. </footer>
  758. </div>
  759. </div>
  760. </section>
  761. </div>
  762. <script type="text/javascript">
  763. var DOCUMENTATION_OPTIONS = {
  764. URL_ROOT:'./',
  765. VERSION:'0.11.0b0',
  766. COLLAPSE_INDEX:false,
  767. FILE_SUFFIX:'.html',
  768. HAS_SOURCE: true
  769. };
  770. </script>
  771. <script type="text/javascript" src="_static/jquery.js"></script>
  772. <script type="text/javascript" src="_static/underscore.js"></script>
  773. <script type="text/javascript" src="_static/doctools.js"></script>
  774. <script type="text/javascript" src="_static/js/theme.js"></script>
  775. <script type="text/javascript">
  776. jQuery(function () {
  777. SphinxRtdTheme.StickyNav.enable();
  778. });
  779. </script>
  780. </body>
  781. </html>