grpc.html 104 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839
  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 package &mdash; grpcio 0.15.0 documentation</title>
  8. <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  9. <link rel="top" title="grpcio 0.15.0 documentation" href="index.html"/>
  10. <link rel="next" title="grpc.beta package" href="grpc.beta.html"/>
  11. <link rel="prev" title="Welcome to grpcio’s documentation!" href="index.html"/>
  12. <script src="_static/js/modernizr.min.js"></script>
  13. </head>
  14. <body class="wy-body-for-nav" role="document">
  15. <div class="wy-grid-for-nav">
  16. <nav data-toggle="wy-nav-shift" class="wy-nav-side">
  17. <div class="wy-side-scroll">
  18. <div class="wy-side-nav-search">
  19. <a href="index.html" class="icon icon-home"> grpcio
  20. </a>
  21. <div class="version">
  22. 0.15.0
  23. </div>
  24. <div role="search">
  25. <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
  26. <input type="text" name="q" placeholder="Search docs" />
  27. <input type="hidden" name="check_keywords" value="yes" />
  28. <input type="hidden" name="area" value="default" />
  29. </form>
  30. </div>
  31. </div>
  32. <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
  33. <ul class="current">
  34. <li class="toctree-l1 current"><a class="current reference internal" href="#">grpc package</a><ul>
  35. <li class="toctree-l2"><a class="reference internal" href="#subpackages">Subpackages</a><ul>
  36. <li class="toctree-l3"><a class="reference internal" href="grpc.beta.html">grpc.beta package</a></li>
  37. <li class="toctree-l3"><a class="reference internal" href="grpc.framework.html">grpc.framework package</a></li>
  38. </ul>
  39. </li>
  40. <li class="toctree-l2"><a class="reference internal" href="#module-grpc">Module contents</a></li>
  41. </ul>
  42. </li>
  43. </ul>
  44. </div>
  45. </div>
  46. </nav>
  47. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
  48. <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
  49. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  50. <a href="index.html">grpcio</a>
  51. </nav>
  52. <div class="wy-nav-content">
  53. <div class="rst-content">
  54. <div role="navigation" aria-label="breadcrumbs navigation">
  55. <ul class="wy-breadcrumbs">
  56. <li><a href="index.html">Docs</a> &raquo;</li>
  57. <li>grpc package</li>
  58. <li class="wy-breadcrumbs-aside">
  59. <a href="_sources/grpc.txt" rel="nofollow"> View page source</a>
  60. </li>
  61. </ul>
  62. <hr/>
  63. </div>
  64. <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
  65. <div itemprop="articleBody">
  66. <div class="section" id="grpc-package">
  67. <h1>grpc package<a class="headerlink" href="#grpc-package" title="Permalink to this headline">¶</a></h1>
  68. <div class="section" id="subpackages">
  69. <h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline">¶</a></h2>
  70. <div class="toctree-wrapper compound">
  71. <ul>
  72. <li class="toctree-l1"><a class="reference internal" href="grpc.beta.html">grpc.beta package</a><ul>
  73. <li class="toctree-l2"><a class="reference internal" href="grpc.beta.html#submodules">Submodules</a></li>
  74. <li class="toctree-l2"><a class="reference internal" href="grpc.beta.html#module-grpc.beta.implementations">grpc.beta.implementations module</a></li>
  75. <li class="toctree-l2"><a class="reference internal" href="grpc.beta.html#module-grpc.beta.interfaces">grpc.beta.interfaces module</a></li>
  76. <li class="toctree-l2"><a class="reference internal" href="grpc.beta.html#module-grpc.beta.utilities">grpc.beta.utilities module</a></li>
  77. <li class="toctree-l2"><a class="reference internal" href="grpc.beta.html#module-grpc.beta">Module contents</a></li>
  78. </ul>
  79. </li>
  80. <li class="toctree-l1"><a class="reference internal" href="grpc.framework.html">grpc.framework package</a><ul>
  81. <li class="toctree-l2"><a class="reference internal" href="grpc.framework.html#subpackages">Subpackages</a><ul>
  82. <li class="toctree-l3"><a class="reference internal" href="grpc.framework.common.html">grpc.framework.common package</a><ul>
  83. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.common.html#submodules">Submodules</a></li>
  84. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.common.html#module-grpc.framework.common.cardinality">grpc.framework.common.cardinality module</a></li>
  85. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.common.html#module-grpc.framework.common.style">grpc.framework.common.style module</a></li>
  86. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.common.html#module-grpc.framework.common">Module contents</a></li>
  87. </ul>
  88. </li>
  89. <li class="toctree-l3"><a class="reference internal" href="grpc.framework.core.html">grpc.framework.core package</a><ul>
  90. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.core.html#submodules">Submodules</a></li>
  91. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.core.html#module-grpc.framework.core.implementations">grpc.framework.core.implementations module</a></li>
  92. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.core.html#module-grpc.framework.core">Module contents</a></li>
  93. </ul>
  94. </li>
  95. <li class="toctree-l3"><a class="reference internal" href="grpc.framework.crust.html">grpc.framework.crust package</a><ul>
  96. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.crust.html#submodules">Submodules</a></li>
  97. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.crust.html#module-grpc.framework.crust.implementations">grpc.framework.crust.implementations module</a></li>
  98. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.crust.html#module-grpc.framework.crust">Module contents</a></li>
  99. </ul>
  100. </li>
  101. <li class="toctree-l3"><a class="reference internal" href="grpc.framework.foundation.html">grpc.framework.foundation package</a><ul>
  102. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.foundation.html#submodules">Submodules</a></li>
  103. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.foundation.html#module-grpc.framework.foundation.abandonment">grpc.framework.foundation.abandonment module</a></li>
  104. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.foundation.html#module-grpc.framework.foundation.activated">grpc.framework.foundation.activated module</a></li>
  105. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.foundation.html#module-grpc.framework.foundation.callable_util">grpc.framework.foundation.callable_util module</a></li>
  106. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.foundation.html#module-grpc.framework.foundation.future">grpc.framework.foundation.future module</a></li>
  107. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.foundation.html#module-grpc.framework.foundation.later">grpc.framework.foundation.later module</a></li>
  108. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.foundation.html#module-grpc.framework.foundation.logging_pool">grpc.framework.foundation.logging_pool module</a></li>
  109. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.foundation.html#module-grpc.framework.foundation.relay">grpc.framework.foundation.relay module</a></li>
  110. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.foundation.html#module-grpc.framework.foundation.stream">grpc.framework.foundation.stream module</a></li>
  111. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.foundation.html#module-grpc.framework.foundation.stream_util">grpc.framework.foundation.stream_util module</a></li>
  112. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.foundation.html#module-grpc.framework.foundation">Module contents</a></li>
  113. </ul>
  114. </li>
  115. <li class="toctree-l3"><a class="reference internal" href="grpc.framework.interfaces.html">grpc.framework.interfaces package</a><ul>
  116. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.interfaces.html#subpackages">Subpackages</a><ul>
  117. <li class="toctree-l5"><a class="reference internal" href="grpc.framework.interfaces.base.html">grpc.framework.interfaces.base package</a><ul>
  118. <li class="toctree-l6"><a class="reference internal" href="grpc.framework.interfaces.base.html#submodules">Submodules</a></li>
  119. <li class="toctree-l6"><a class="reference internal" href="grpc.framework.interfaces.base.html#module-grpc.framework.interfaces.base.base">grpc.framework.interfaces.base.base module</a></li>
  120. <li class="toctree-l6"><a class="reference internal" href="grpc.framework.interfaces.base.html#module-grpc.framework.interfaces.base.utilities">grpc.framework.interfaces.base.utilities module</a></li>
  121. <li class="toctree-l6"><a class="reference internal" href="grpc.framework.interfaces.base.html#module-grpc.framework.interfaces.base">Module contents</a></li>
  122. </ul>
  123. </li>
  124. <li class="toctree-l5"><a class="reference internal" href="grpc.framework.interfaces.face.html">grpc.framework.interfaces.face package</a><ul>
  125. <li class="toctree-l6"><a class="reference internal" href="grpc.framework.interfaces.face.html#submodules">Submodules</a></li>
  126. <li class="toctree-l6"><a class="reference internal" href="grpc.framework.interfaces.face.html#module-grpc.framework.interfaces.face.face">grpc.framework.interfaces.face.face module</a></li>
  127. <li class="toctree-l6"><a class="reference internal" href="grpc.framework.interfaces.face.html#module-grpc.framework.interfaces.face.utilities">grpc.framework.interfaces.face.utilities module</a></li>
  128. <li class="toctree-l6"><a class="reference internal" href="grpc.framework.interfaces.face.html#module-grpc.framework.interfaces.face">Module contents</a></li>
  129. </ul>
  130. </li>
  131. <li class="toctree-l5"><a class="reference internal" href="grpc.framework.interfaces.links.html">grpc.framework.interfaces.links package</a><ul>
  132. <li class="toctree-l6"><a class="reference internal" href="grpc.framework.interfaces.links.html#submodules">Submodules</a></li>
  133. <li class="toctree-l6"><a class="reference internal" href="grpc.framework.interfaces.links.html#module-grpc.framework.interfaces.links.links">grpc.framework.interfaces.links.links module</a></li>
  134. <li class="toctree-l6"><a class="reference internal" href="grpc.framework.interfaces.links.html#module-grpc.framework.interfaces.links.utilities">grpc.framework.interfaces.links.utilities module</a></li>
  135. <li class="toctree-l6"><a class="reference internal" href="grpc.framework.interfaces.links.html#module-grpc.framework.interfaces.links">Module contents</a></li>
  136. </ul>
  137. </li>
  138. </ul>
  139. </li>
  140. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.interfaces.html#module-grpc.framework.interfaces">Module contents</a></li>
  141. </ul>
  142. </li>
  143. </ul>
  144. </li>
  145. <li class="toctree-l2"><a class="reference internal" href="grpc.framework.html#module-grpc.framework">Module contents</a></li>
  146. </ul>
  147. </li>
  148. </ul>
  149. </div>
  150. </div>
  151. <div class="section" id="module-grpc">
  152. <span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-grpc" title="Permalink to this headline">¶</a></h2>
  153. <p>gRPC&#8217;s Python API.</p>
  154. <dl class="exception">
  155. <dt id="grpc.FutureTimeoutError">
  156. <em class="property">exception </em><code class="descclassname">grpc.</code><code class="descname">FutureTimeoutError</code><a class="reference internal" href="_modules/grpc.html#FutureTimeoutError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.FutureTimeoutError" title="Permalink to this definition">¶</a></dt>
  157. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></code></p>
  158. <p>Indicates that a method call on a Future timed out.</p>
  159. </dd></dl>
  160. <dl class="exception">
  161. <dt id="grpc.FutureCancelledError">
  162. <em class="property">exception </em><code class="descclassname">grpc.</code><code class="descname">FutureCancelledError</code><a class="reference internal" href="_modules/grpc.html#FutureCancelledError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.FutureCancelledError" title="Permalink to this definition">¶</a></dt>
  163. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></code></p>
  164. <p>Indicates that the computation underlying a Future was cancelled.</p>
  165. </dd></dl>
  166. <dl class="class">
  167. <dt id="grpc.Future">
  168. <em class="property">class </em><code class="descclassname">grpc.</code><code class="descname">Future</code><a class="reference internal" href="_modules/grpc.html#Future"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Future" title="Permalink to this definition">¶</a></dt>
  169. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">abc.NewBase</span></code></p>
  170. <p>A representation of a computation in another control flow.</p>
  171. <p>Computations represented by a Future may be yet to be begun, may be ongoing,
  172. or may have already completed.</p>
  173. <dl class="method">
  174. <dt id="grpc.Future.add_done_callback">
  175. <code class="descname">add_done_callback</code><span class="sig-paren">(</span><em>fn</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Future.add_done_callback"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Future.add_done_callback" title="Permalink to this definition">¶</a></dt>
  176. <dd><p>Adds a function to be called at completion of the computation.</p>
  177. <p>The callback will be passed this Future object describing the outcome of
  178. the computation.</p>
  179. <p>If the computation has already completed, the callback will be called
  180. immediately.</p>
  181. <table class="docutils field-list" frame="void" rules="none">
  182. <col class="field-name" />
  183. <col class="field-body" />
  184. <tbody valign="top">
  185. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>fn</strong> &#8211; A callable taking this Future object as its single parameter.</td>
  186. </tr>
  187. </tbody>
  188. </table>
  189. </dd></dl>
  190. <dl class="method">
  191. <dt id="grpc.Future.cancel">
  192. <code class="descname">cancel</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Future.cancel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Future.cancel" title="Permalink to this definition">¶</a></dt>
  193. <dd><p>Attempts to cancel the computation.</p>
  194. <p>This method does not block.</p>
  195. <table class="docutils field-list" frame="void" rules="none">
  196. <col class="field-name" />
  197. <col class="field-body" />
  198. <tbody valign="top">
  199. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><dl class="docutils">
  200. <dt>True if the computation has not yet begun, will not be allowed to take</dt>
  201. <dd>place, and determination of both was possible without blocking. False
  202. under all other circumstances including but not limited to the
  203. computation&#8217;s already having begun, the computation&#8217;s already having
  204. finished, and the computation&#8217;s having been scheduled for execution on a
  205. remote system for which a determination of whether or not it commenced
  206. before being cancelled cannot be made without blocking.</dd>
  207. </dl>
  208. </td>
  209. </tr>
  210. </tbody>
  211. </table>
  212. </dd></dl>
  213. <dl class="method">
  214. <dt id="grpc.Future.cancelled">
  215. <code class="descname">cancelled</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Future.cancelled"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Future.cancelled" title="Permalink to this definition">¶</a></dt>
  216. <dd><p>Describes whether the computation was cancelled.</p>
  217. <p>This method does not block.</p>
  218. <table class="docutils field-list" frame="void" rules="none">
  219. <col class="field-name" />
  220. <col class="field-body" />
  221. <tbody valign="top">
  222. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><dl class="docutils">
  223. <dt>True if the computation was cancelled any time before its result became</dt>
  224. <dd>immediately available. False under all other circumstances including but
  225. not limited to this object&#8217;s cancel method not having been called and
  226. the computation&#8217;s result having become immediately available.</dd>
  227. </dl>
  228. </td>
  229. </tr>
  230. </tbody>
  231. </table>
  232. </dd></dl>
  233. <dl class="method">
  234. <dt id="grpc.Future.done">
  235. <code class="descname">done</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Future.done"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Future.done" title="Permalink to this definition">¶</a></dt>
  236. <dd><p>Describes whether the computation has taken place.</p>
  237. <p>This method does not block.</p>
  238. <table class="docutils field-list" frame="void" rules="none">
  239. <col class="field-name" />
  240. <col class="field-body" />
  241. <tbody valign="top">
  242. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><dl class="docutils">
  243. <dt>True if the computation is known to have either completed or have been</dt>
  244. <dd>unscheduled or interrupted. False if the computation may possibly be
  245. executing or scheduled to execute later.</dd>
  246. </dl>
  247. </td>
  248. </tr>
  249. </tbody>
  250. </table>
  251. </dd></dl>
  252. <dl class="method">
  253. <dt id="grpc.Future.exception">
  254. <code class="descname">exception</code><span class="sig-paren">(</span><em>timeout=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Future.exception"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Future.exception" title="Permalink to this definition">¶</a></dt>
  255. <dd><p>Return the exception raised by the computation.</p>
  256. <p>This method may return immediately or may block.</p>
  257. <table class="docutils field-list" frame="void" rules="none">
  258. <col class="field-name" />
  259. <col class="field-body" />
  260. <tbody valign="top">
  261. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>timeout</strong> &#8211; The length of time in seconds to wait for the computation to
  262. terminate or be cancelled, or None if this method should block until
  263. the computation is terminated or is cancelled no matter how long that
  264. takes.</p>
  265. </td>
  266. </tr>
  267. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><dl class="docutils">
  268. <dt>The exception raised by the computation, or None if the computation did</dt>
  269. <dd><p class="first last">not raise an exception.</p>
  270. </dd>
  271. </dl>
  272. </p>
  273. </td>
  274. </tr>
  275. <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple">
  276. <li><a class="reference internal" href="#grpc.FutureTimeoutError" title="grpc.FutureTimeoutError"><code class="xref py py-exc docutils literal"><span class="pre">FutureTimeoutError</span></code></a> &#8211; If a timeout value is passed and the computation does
  277. not terminate within the allotted time.</li>
  278. <li><a class="reference internal" href="#grpc.FutureCancelledError" title="grpc.FutureCancelledError"><code class="xref py py-exc docutils literal"><span class="pre">FutureCancelledError</span></code></a> &#8211; If the computation was cancelled.</li>
  279. </ul>
  280. </td>
  281. </tr>
  282. </tbody>
  283. </table>
  284. </dd></dl>
  285. <dl class="method">
  286. <dt id="grpc.Future.result">
  287. <code class="descname">result</code><span class="sig-paren">(</span><em>timeout=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Future.result"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Future.result" title="Permalink to this definition">¶</a></dt>
  288. <dd><p>Accesses the outcome of the computation or raises its exception.</p>
  289. <p>This method may return immediately or may block.</p>
  290. <table class="docutils field-list" frame="void" rules="none">
  291. <col class="field-name" />
  292. <col class="field-body" />
  293. <tbody valign="top">
  294. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>timeout</strong> &#8211; The length of time in seconds to wait for the computation to
  295. finish or be cancelled, or None if this method should block until the
  296. computation has finished or is cancelled no matter how long that takes.</p>
  297. </td>
  298. </tr>
  299. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The return value of the computation.</p>
  300. </td>
  301. </tr>
  302. <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple">
  303. <li><a class="reference internal" href="#grpc.FutureTimeoutError" title="grpc.FutureTimeoutError"><code class="xref py py-exc docutils literal"><span class="pre">FutureTimeoutError</span></code></a> &#8211; If a timeout value is passed and the computation does
  304. not terminate within the allotted time.</li>
  305. <li><a class="reference internal" href="#grpc.FutureCancelledError" title="grpc.FutureCancelledError"><code class="xref py py-exc docutils literal"><span class="pre">FutureCancelledError</span></code></a> &#8211; If the computation was cancelled.</li>
  306. <li><code class="xref py py-exc docutils literal"><span class="pre">Exception</span></code> &#8211; If the computation raised an exception, this call will raise
  307. the same exception.</li>
  308. </ul>
  309. </td>
  310. </tr>
  311. </tbody>
  312. </table>
  313. </dd></dl>
  314. <dl class="method">
  315. <dt id="grpc.Future.running">
  316. <code class="descname">running</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Future.running"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Future.running" title="Permalink to this definition">¶</a></dt>
  317. <dd><p>Describes whether the computation is taking place.</p>
  318. <p>This method does not block.</p>
  319. <table class="docutils field-list" frame="void" rules="none">
  320. <col class="field-name" />
  321. <col class="field-body" />
  322. <tbody valign="top">
  323. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><dl class="docutils">
  324. <dt>True if the computation is scheduled to take place in the future or is</dt>
  325. <dd>taking place now, or False if the computation took place in the past or
  326. was cancelled.</dd>
  327. </dl>
  328. </td>
  329. </tr>
  330. </tbody>
  331. </table>
  332. </dd></dl>
  333. <dl class="method">
  334. <dt id="grpc.Future.traceback">
  335. <code class="descname">traceback</code><span class="sig-paren">(</span><em>timeout=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Future.traceback"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Future.traceback" title="Permalink to this definition">¶</a></dt>
  336. <dd><p>Access the traceback of the exception raised by the computation.</p>
  337. <p>This method may return immediately or may block.</p>
  338. <table class="docutils field-list" frame="void" rules="none">
  339. <col class="field-name" />
  340. <col class="field-body" />
  341. <tbody valign="top">
  342. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>timeout</strong> &#8211; The length of time in seconds to wait for the computation to
  343. terminate or be cancelled, or None if this method should block until
  344. the computation is terminated or is cancelled no matter how long that
  345. takes.</p>
  346. </td>
  347. </tr>
  348. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><dl class="docutils">
  349. <dt>The traceback of the exception raised by the computation, or None if the</dt>
  350. <dd><p class="first last">computation did not raise an exception.</p>
  351. </dd>
  352. </dl>
  353. </p>
  354. </td>
  355. </tr>
  356. <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple">
  357. <li><a class="reference internal" href="#grpc.FutureTimeoutError" title="grpc.FutureTimeoutError"><code class="xref py py-exc docutils literal"><span class="pre">FutureTimeoutError</span></code></a> &#8211; If a timeout value is passed and the computation does
  358. not terminate within the allotted time.</li>
  359. <li><a class="reference internal" href="#grpc.FutureCancelledError" title="grpc.FutureCancelledError"><code class="xref py py-exc docutils literal"><span class="pre">FutureCancelledError</span></code></a> &#8211; If the computation was cancelled.</li>
  360. </ul>
  361. </td>
  362. </tr>
  363. </tbody>
  364. </table>
  365. </dd></dl>
  366. </dd></dl>
  367. <dl class="class">
  368. <dt id="grpc.ChannelConnectivity">
  369. <em class="property">class </em><code class="descclassname">grpc.</code><code class="descname">ChannelConnectivity</code><a class="reference internal" href="_modules/grpc.html#ChannelConnectivity"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.ChannelConnectivity" title="Permalink to this definition">¶</a></dt>
  370. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">enum.Enum</span></code></p>
  371. <p>Mirrors grpc_connectivity_state in the gRPC Core.</p>
  372. <dl class="attribute">
  373. <dt id="grpc.ChannelConnectivity.IDLE">
  374. <code class="descname">IDLE</code><a class="headerlink" href="#grpc.ChannelConnectivity.IDLE" title="Permalink to this definition">¶</a></dt>
  375. <dd><p>The channel is idle.</p>
  376. </dd></dl>
  377. <dl class="attribute">
  378. <dt id="grpc.ChannelConnectivity.CONNECTING">
  379. <code class="descname">CONNECTING</code><a class="headerlink" href="#grpc.ChannelConnectivity.CONNECTING" title="Permalink to this definition">¶</a></dt>
  380. <dd><p>The channel is connecting.</p>
  381. </dd></dl>
  382. <dl class="attribute">
  383. <dt id="grpc.ChannelConnectivity.READY">
  384. <code class="descname">READY</code><a class="headerlink" href="#grpc.ChannelConnectivity.READY" title="Permalink to this definition">¶</a></dt>
  385. <dd><p>The channel is ready to conduct RPCs.</p>
  386. </dd></dl>
  387. <dl class="attribute">
  388. <dt id="grpc.ChannelConnectivity.TRANSIENT_FAILURE">
  389. <code class="descname">TRANSIENT_FAILURE</code><a class="headerlink" href="#grpc.ChannelConnectivity.TRANSIENT_FAILURE" title="Permalink to this definition">¶</a></dt>
  390. <dd><p>The channel has seen a failure from which it expects to
  391. recover.</p>
  392. </dd></dl>
  393. <dl class="attribute">
  394. <dt id="grpc.ChannelConnectivity.SHUTDOWN">
  395. <code class="descname">SHUTDOWN</code><a class="headerlink" href="#grpc.ChannelConnectivity.SHUTDOWN" title="Permalink to this definition">¶</a></dt>
  396. <dd><p>The channel has seen a failure from which it cannot recover.</p>
  397. </dd></dl>
  398. <dl class="attribute">
  399. <dt>
  400. <code class="descname">CONNECTING</code><em class="property"> = &lt;ChannelConnectivity.CONNECTING: (1, 'connecting')&gt;</em></dt>
  401. <dd></dd></dl>
  402. <dl class="attribute">
  403. <dt>
  404. <code class="descname">IDLE</code><em class="property"> = &lt;ChannelConnectivity.IDLE: (0, 'idle')&gt;</em></dt>
  405. <dd></dd></dl>
  406. <dl class="attribute">
  407. <dt>
  408. <code class="descname">READY</code><em class="property"> = &lt;ChannelConnectivity.READY: (2, 'ready')&gt;</em></dt>
  409. <dd></dd></dl>
  410. <dl class="attribute">
  411. <dt>
  412. <code class="descname">SHUTDOWN</code><em class="property"> = &lt;ChannelConnectivity.SHUTDOWN: (4, 'shutdown')&gt;</em></dt>
  413. <dd></dd></dl>
  414. <dl class="attribute">
  415. <dt>
  416. <code class="descname">TRANSIENT_FAILURE</code><em class="property"> = &lt;ChannelConnectivity.TRANSIENT_FAILURE: (3, 'transient failure')&gt;</em></dt>
  417. <dd></dd></dl>
  418. </dd></dl>
  419. <dl class="class">
  420. <dt id="grpc.StatusCode">
  421. <em class="property">class </em><code class="descclassname">grpc.</code><code class="descname">StatusCode</code><a class="reference internal" href="_modules/grpc.html#StatusCode"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.StatusCode" title="Permalink to this definition">¶</a></dt>
  422. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">enum.Enum</span></code></p>
  423. <p>Mirrors grpc_status_code in the gRPC Core.</p>
  424. <dl class="attribute">
  425. <dt id="grpc.StatusCode.ABORTED">
  426. <code class="descname">ABORTED</code><em class="property"> = &lt;StatusCode.ABORTED: (10, 'aborted')&gt;</em><a class="headerlink" href="#grpc.StatusCode.ABORTED" title="Permalink to this definition">¶</a></dt>
  427. <dd></dd></dl>
  428. <dl class="attribute">
  429. <dt id="grpc.StatusCode.ALREADY_EXISTS">
  430. <code class="descname">ALREADY_EXISTS</code><em class="property"> = &lt;StatusCode.ALREADY_EXISTS: (6, 'already exists')&gt;</em><a class="headerlink" href="#grpc.StatusCode.ALREADY_EXISTS" title="Permalink to this definition">¶</a></dt>
  431. <dd></dd></dl>
  432. <dl class="attribute">
  433. <dt id="grpc.StatusCode.CANCELLED">
  434. <code class="descname">CANCELLED</code><em class="property"> = &lt;StatusCode.CANCELLED: (1, 'cancelled')&gt;</em><a class="headerlink" href="#grpc.StatusCode.CANCELLED" title="Permalink to this definition">¶</a></dt>
  435. <dd></dd></dl>
  436. <dl class="attribute">
  437. <dt id="grpc.StatusCode.DATA_LOSS">
  438. <code class="descname">DATA_LOSS</code><em class="property"> = &lt;StatusCode.DATA_LOSS: (15, 'data loss')&gt;</em><a class="headerlink" href="#grpc.StatusCode.DATA_LOSS" title="Permalink to this definition">¶</a></dt>
  439. <dd></dd></dl>
  440. <dl class="attribute">
  441. <dt id="grpc.StatusCode.DEADLINE_EXCEEDED">
  442. <code class="descname">DEADLINE_EXCEEDED</code><em class="property"> = &lt;StatusCode.DEADLINE_EXCEEDED: (4, 'deadline exceeded')&gt;</em><a class="headerlink" href="#grpc.StatusCode.DEADLINE_EXCEEDED" title="Permalink to this definition">¶</a></dt>
  443. <dd></dd></dl>
  444. <dl class="attribute">
  445. <dt id="grpc.StatusCode.FAILED_PRECONDITION">
  446. <code class="descname">FAILED_PRECONDITION</code><em class="property"> = &lt;StatusCode.FAILED_PRECONDITION: (9, 'failed precondition')&gt;</em><a class="headerlink" href="#grpc.StatusCode.FAILED_PRECONDITION" title="Permalink to this definition">¶</a></dt>
  447. <dd></dd></dl>
  448. <dl class="attribute">
  449. <dt id="grpc.StatusCode.INTERNAL">
  450. <code class="descname">INTERNAL</code><em class="property"> = &lt;StatusCode.INTERNAL: (13, 'internal')&gt;</em><a class="headerlink" href="#grpc.StatusCode.INTERNAL" title="Permalink to this definition">¶</a></dt>
  451. <dd></dd></dl>
  452. <dl class="attribute">
  453. <dt id="grpc.StatusCode.INVALID_ARGUMENT">
  454. <code class="descname">INVALID_ARGUMENT</code><em class="property"> = &lt;StatusCode.INVALID_ARGUMENT: (3, 'invalid argument')&gt;</em><a class="headerlink" href="#grpc.StatusCode.INVALID_ARGUMENT" title="Permalink to this definition">¶</a></dt>
  455. <dd></dd></dl>
  456. <dl class="attribute">
  457. <dt id="grpc.StatusCode.NOT_FOUND">
  458. <code class="descname">NOT_FOUND</code><em class="property"> = &lt;StatusCode.NOT_FOUND: (5, 'not found')&gt;</em><a class="headerlink" href="#grpc.StatusCode.NOT_FOUND" title="Permalink to this definition">¶</a></dt>
  459. <dd></dd></dl>
  460. <dl class="attribute">
  461. <dt id="grpc.StatusCode.OK">
  462. <code class="descname">OK</code><em class="property"> = &lt;StatusCode.OK: (0, 'ok')&gt;</em><a class="headerlink" href="#grpc.StatusCode.OK" title="Permalink to this definition">¶</a></dt>
  463. <dd></dd></dl>
  464. <dl class="attribute">
  465. <dt id="grpc.StatusCode.OUT_OF_RANGE">
  466. <code class="descname">OUT_OF_RANGE</code><em class="property"> = &lt;StatusCode.OUT_OF_RANGE: (11, 'out of range')&gt;</em><a class="headerlink" href="#grpc.StatusCode.OUT_OF_RANGE" title="Permalink to this definition">¶</a></dt>
  467. <dd></dd></dl>
  468. <dl class="attribute">
  469. <dt id="grpc.StatusCode.PERMISSION_DENIED">
  470. <code class="descname">PERMISSION_DENIED</code><em class="property"> = &lt;StatusCode.PERMISSION_DENIED: (7, 'permission denied')&gt;</em><a class="headerlink" href="#grpc.StatusCode.PERMISSION_DENIED" title="Permalink to this definition">¶</a></dt>
  471. <dd></dd></dl>
  472. <dl class="attribute">
  473. <dt id="grpc.StatusCode.RESOURCE_EXHAUSTED">
  474. <code class="descname">RESOURCE_EXHAUSTED</code><em class="property"> = &lt;StatusCode.RESOURCE_EXHAUSTED: (8, 'resource exhausted')&gt;</em><a class="headerlink" href="#grpc.StatusCode.RESOURCE_EXHAUSTED" title="Permalink to this definition">¶</a></dt>
  475. <dd></dd></dl>
  476. <dl class="attribute">
  477. <dt id="grpc.StatusCode.UNAUTHENTICATED">
  478. <code class="descname">UNAUTHENTICATED</code><em class="property"> = &lt;StatusCode.UNAUTHENTICATED: (16, 'unauthenticated')&gt;</em><a class="headerlink" href="#grpc.StatusCode.UNAUTHENTICATED" title="Permalink to this definition">¶</a></dt>
  479. <dd></dd></dl>
  480. <dl class="attribute">
  481. <dt id="grpc.StatusCode.UNAVAILABLE">
  482. <code class="descname">UNAVAILABLE</code><em class="property"> = &lt;StatusCode.UNAVAILABLE: (14, 'unavailable')&gt;</em><a class="headerlink" href="#grpc.StatusCode.UNAVAILABLE" title="Permalink to this definition">¶</a></dt>
  483. <dd></dd></dl>
  484. <dl class="attribute">
  485. <dt id="grpc.StatusCode.UNIMPLEMENTED">
  486. <code class="descname">UNIMPLEMENTED</code><em class="property"> = &lt;StatusCode.UNIMPLEMENTED: (12, 'unimplemented')&gt;</em><a class="headerlink" href="#grpc.StatusCode.UNIMPLEMENTED" title="Permalink to this definition">¶</a></dt>
  487. <dd></dd></dl>
  488. <dl class="attribute">
  489. <dt id="grpc.StatusCode.UNKNOWN">
  490. <code class="descname">UNKNOWN</code><em class="property"> = &lt;StatusCode.UNKNOWN: (2, 'unknown')&gt;</em><a class="headerlink" href="#grpc.StatusCode.UNKNOWN" title="Permalink to this definition">¶</a></dt>
  491. <dd></dd></dl>
  492. </dd></dl>
  493. <dl class="exception">
  494. <dt id="grpc.RpcError">
  495. <em class="property">exception </em><code class="descclassname">grpc.</code><code class="descname">RpcError</code><a class="reference internal" href="_modules/grpc.html#RpcError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.RpcError" title="Permalink to this definition">¶</a></dt>
  496. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></code></p>
  497. <p>Raised by the gRPC library to indicate non-OK-status RPC termination.</p>
  498. </dd></dl>
  499. <dl class="class">
  500. <dt id="grpc.RpcContext">
  501. <em class="property">class </em><code class="descclassname">grpc.</code><code class="descname">RpcContext</code><a class="reference internal" href="_modules/grpc.html#RpcContext"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.RpcContext" title="Permalink to this definition">¶</a></dt>
  502. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">abc.NewBase</span></code></p>
  503. <p>Provides RPC-related information and action.</p>
  504. <dl class="method">
  505. <dt id="grpc.RpcContext.add_callback">
  506. <code class="descname">add_callback</code><span class="sig-paren">(</span><em>callback</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#RpcContext.add_callback"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.RpcContext.add_callback" title="Permalink to this definition">¶</a></dt>
  507. <dd><p>Registers a callback to be called on RPC termination.</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">Parameters:</th><td class="field-body"><strong>callback</strong> &#8211; A no-parameter callable to be called on RPC termination.</td>
  513. </tr>
  514. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="docutils">
  515. <dt>True if the callback was added and will be called later; False if the</dt>
  516. <dd>callback was not added and will not later be called (because the RPC
  517. already terminated or some other reason).</dd>
  518. </dl>
  519. </td>
  520. </tr>
  521. </tbody>
  522. </table>
  523. </dd></dl>
  524. <dl class="method">
  525. <dt id="grpc.RpcContext.cancel">
  526. <code class="descname">cancel</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#RpcContext.cancel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.RpcContext.cancel" title="Permalink to this definition">¶</a></dt>
  527. <dd><p>Cancels the RPC.</p>
  528. <p>Idempotent and has no effect if the RPC has already terminated.</p>
  529. </dd></dl>
  530. <dl class="method">
  531. <dt id="grpc.RpcContext.is_active">
  532. <code class="descname">is_active</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#RpcContext.is_active"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.RpcContext.is_active" title="Permalink to this definition">¶</a></dt>
  533. <dd><p>Describes whether the RPC is active or has terminated.</p>
  534. </dd></dl>
  535. <dl class="method">
  536. <dt id="grpc.RpcContext.time_remaining">
  537. <code class="descname">time_remaining</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#RpcContext.time_remaining"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.RpcContext.time_remaining" title="Permalink to this definition">¶</a></dt>
  538. <dd><p>Describes the length of allowed time remaining for the RPC.</p>
  539. <table class="docutils field-list" frame="void" rules="none">
  540. <col class="field-name" />
  541. <col class="field-body" />
  542. <tbody valign="top">
  543. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A nonnegative float indicating the length of allowed time in seconds
  544. remaining for the RPC to complete before it is considered to have timed
  545. out, or None if no deadline was specified for the RPC.</td>
  546. </tr>
  547. </tbody>
  548. </table>
  549. </dd></dl>
  550. </dd></dl>
  551. <dl class="class">
  552. <dt id="grpc.Call">
  553. <em class="property">class </em><code class="descclassname">grpc.</code><code class="descname">Call</code><a class="reference internal" href="_modules/grpc.html#Call"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Call" title="Permalink to this definition">¶</a></dt>
  554. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">abc.NewBase</span></code></p>
  555. <p>Invocation-side utility object for an RPC.</p>
  556. <dl class="method">
  557. <dt id="grpc.Call.code">
  558. <code class="descname">code</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Call.code"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Call.code" title="Permalink to this definition">¶</a></dt>
  559. <dd><p>Accesses the status code emitted by the service-side of the RPC.</p>
  560. <p>This method blocks until the value is available.</p>
  561. <table class="docutils field-list" frame="void" rules="none">
  562. <col class="field-name" />
  563. <col class="field-body" />
  564. <tbody valign="top">
  565. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The StatusCode value for the RPC.</td>
  566. </tr>
  567. </tbody>
  568. </table>
  569. </dd></dl>
  570. <dl class="method">
  571. <dt id="grpc.Call.details">
  572. <code class="descname">details</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Call.details"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Call.details" title="Permalink to this definition">¶</a></dt>
  573. <dd><p>Accesses the details value emitted by the service-side of the RPC.</p>
  574. <p>This method blocks until the value is available.</p>
  575. <table class="docutils field-list" frame="void" rules="none">
  576. <col class="field-name" />
  577. <col class="field-body" />
  578. <tbody valign="top">
  579. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The bytes of the details of the RPC.</td>
  580. </tr>
  581. </tbody>
  582. </table>
  583. </dd></dl>
  584. <dl class="method">
  585. <dt id="grpc.Call.initial_metadata">
  586. <code class="descname">initial_metadata</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Call.initial_metadata"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Call.initial_metadata" title="Permalink to this definition">¶</a></dt>
  587. <dd><p>Accesses the initial metadata from the service-side of the RPC.</p>
  588. <p>This method blocks until the value is available.</p>
  589. <table class="docutils field-list" frame="void" rules="none">
  590. <col class="field-name" />
  591. <col class="field-body" />
  592. <tbody valign="top">
  593. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The initial metadata as a sequence of pairs of bytes.</td>
  594. </tr>
  595. </tbody>
  596. </table>
  597. </dd></dl>
  598. <dl class="method">
  599. <dt id="grpc.Call.trailing_metadata">
  600. <code class="descname">trailing_metadata</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Call.trailing_metadata"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Call.trailing_metadata" title="Permalink to this definition">¶</a></dt>
  601. <dd><p>Accesses the trailing metadata from the service-side of the RPC.</p>
  602. <p>This method blocks until the value is available.</p>
  603. <table class="docutils field-list" frame="void" rules="none">
  604. <col class="field-name" />
  605. <col class="field-body" />
  606. <tbody valign="top">
  607. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The trailing metadata as a sequence of pairs of bytes.</td>
  608. </tr>
  609. </tbody>
  610. </table>
  611. </dd></dl>
  612. </dd></dl>
  613. <dl class="class">
  614. <dt id="grpc.ChannelCredentials">
  615. <em class="property">class </em><code class="descclassname">grpc.</code><code class="descname">ChannelCredentials</code><span class="sig-paren">(</span><em>credentials</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#ChannelCredentials"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.ChannelCredentials" title="Permalink to this definition">¶</a></dt>
  616. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  617. <p>A value encapsulating the data required to create a secure Channel.</p>
  618. <p>This class has no supported interface - it exists to define the type of its
  619. instances and its instances exist to be passed to other functions.</p>
  620. </dd></dl>
  621. <dl class="class">
  622. <dt id="grpc.CallCredentials">
  623. <em class="property">class </em><code class="descclassname">grpc.</code><code class="descname">CallCredentials</code><span class="sig-paren">(</span><em>credentials</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#CallCredentials"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.CallCredentials" title="Permalink to this definition">¶</a></dt>
  624. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  625. <p>A value encapsulating data asserting an identity over a channel.</p>
  626. <p>A CallCredentials may be composed with ChannelCredentials to always assert
  627. identity for every call over that Channel.</p>
  628. <p>This class has no supported interface - it exists to define the type of its
  629. instances and its instances exist to be passed to other functions.</p>
  630. </dd></dl>
  631. <dl class="class">
  632. <dt id="grpc.AuthMetadataContext">
  633. <em class="property">class </em><code class="descclassname">grpc.</code><code class="descname">AuthMetadataContext</code><a class="reference internal" href="_modules/grpc.html#AuthMetadataContext"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.AuthMetadataContext" title="Permalink to this definition">¶</a></dt>
  634. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">abc.NewBase</span></code></p>
  635. <p>Provides information to call credentials metadata plugins.</p>
  636. <dl class="attribute">
  637. <dt id="grpc.AuthMetadataContext.service_url">
  638. <code class="descname">service_url</code><a class="headerlink" href="#grpc.AuthMetadataContext.service_url" title="Permalink to this definition">¶</a></dt>
  639. <dd><p>A string URL of the service being called into.</p>
  640. </dd></dl>
  641. <dl class="attribute">
  642. <dt id="grpc.AuthMetadataContext.method_name">
  643. <code class="descname">method_name</code><a class="headerlink" href="#grpc.AuthMetadataContext.method_name" title="Permalink to this definition">¶</a></dt>
  644. <dd><p>A string of the fully qualified method name being called.</p>
  645. </dd></dl>
  646. </dd></dl>
  647. <dl class="class">
  648. <dt id="grpc.AuthMetadataPluginCallback">
  649. <em class="property">class </em><code class="descclassname">grpc.</code><code class="descname">AuthMetadataPluginCallback</code><a class="reference internal" href="_modules/grpc.html#AuthMetadataPluginCallback"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.AuthMetadataPluginCallback" title="Permalink to this definition">¶</a></dt>
  650. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">abc.NewBase</span></code></p>
  651. <p>Callback object received by a metadata plugin.</p>
  652. </dd></dl>
  653. <dl class="class">
  654. <dt id="grpc.AuthMetadataPlugin">
  655. <em class="property">class </em><code class="descclassname">grpc.</code><code class="descname">AuthMetadataPlugin</code><a class="reference internal" href="_modules/grpc.html#AuthMetadataPlugin"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.AuthMetadataPlugin" title="Permalink to this definition">¶</a></dt>
  656. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">abc.NewBase</span></code></p>
  657. <p>A specification for custom authentication.</p>
  658. </dd></dl>
  659. <dl class="class">
  660. <dt id="grpc.ServerCredentials">
  661. <em class="property">class </em><code class="descclassname">grpc.</code><code class="descname">ServerCredentials</code><span class="sig-paren">(</span><em>credentials</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#ServerCredentials"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.ServerCredentials" title="Permalink to this definition">¶</a></dt>
  662. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  663. <p>A value encapsulating the data required to open a secure port on a Server.</p>
  664. <p>This class has no supported interface - it exists to define the type of its
  665. instances and its instances exist to be passed to other functions.</p>
  666. </dd></dl>
  667. <dl class="class">
  668. <dt id="grpc.UnaryUnaryMultiCallable">
  669. <em class="property">class </em><code class="descclassname">grpc.</code><code class="descname">UnaryUnaryMultiCallable</code><a class="reference internal" href="_modules/grpc.html#UnaryUnaryMultiCallable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.UnaryUnaryMultiCallable" title="Permalink to this definition">¶</a></dt>
  670. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">abc.NewBase</span></code></p>
  671. <p>Affords invoking a unary-unary RPC.</p>
  672. <dl class="method">
  673. <dt id="grpc.UnaryUnaryMultiCallable.future">
  674. <code class="descname">future</code><span class="sig-paren">(</span><em>request</em>, <em>timeout=None</em>, <em>metadata=None</em>, <em>credentials=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#UnaryUnaryMultiCallable.future"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.UnaryUnaryMultiCallable.future" title="Permalink to this definition">¶</a></dt>
  675. <dd><p>Asynchronously invokes the underlying RPC.</p>
  676. <table class="docutils field-list" frame="void" rules="none">
  677. <col class="field-name" />
  678. <col class="field-body" />
  679. <tbody valign="top">
  680. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  681. <li><strong>request</strong> &#8211; The request value for the RPC.</li>
  682. <li><strong>timeout</strong> &#8211; An optional duration of time in seconds to allow for the RPC.</li>
  683. <li><strong>metadata</strong> &#8211; An optional sequence of pairs of bytes to be transmitted to the
  684. service-side of the RPC.</li>
  685. <li><strong>credentials</strong> &#8211; An optional CallCredentials for the RPC.</li>
  686. </ul>
  687. </td>
  688. </tr>
  689. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  690. <dt>An object that is both a Call for the RPC and a Future. In the event of</dt>
  691. <dd><p class="first last">RPC completion, the return Future&#8217;s result value will be the response
  692. message of the RPC. Should the event terminate with non-OK status, the
  693. returned Future&#8217;s exception value will be an RpcError.</p>
  694. </dd>
  695. </dl>
  696. </p>
  697. </td>
  698. </tr>
  699. </tbody>
  700. </table>
  701. </dd></dl>
  702. <dl class="method">
  703. <dt id="grpc.UnaryUnaryMultiCallable.with_call">
  704. <code class="descname">with_call</code><span class="sig-paren">(</span><em>request</em>, <em>timeout=None</em>, <em>metadata=None</em>, <em>credentials=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#UnaryUnaryMultiCallable.with_call"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.UnaryUnaryMultiCallable.with_call" title="Permalink to this definition">¶</a></dt>
  705. <dd><p>Synchronously invokes the underlying RPC.</p>
  706. <table class="docutils field-list" frame="void" rules="none">
  707. <col class="field-name" />
  708. <col class="field-body" />
  709. <tbody valign="top">
  710. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  711. <li><strong>request</strong> &#8211; The request value for the RPC.</li>
  712. <li><strong>timeout</strong> &#8211; An optional durating of time in seconds to allow for the RPC.</li>
  713. <li><strong>metadata</strong> &#8211; An optional sequence of pairs of bytes to be transmitted to the
  714. service-side of the RPC.</li>
  715. <li><strong>credentials</strong> &#8211; An optional CallCredentials for the RPC.</li>
  716. </ul>
  717. </td>
  718. </tr>
  719. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The response value for the RPC and a Call value for the RPC.</p>
  720. </td>
  721. </tr>
  722. <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#grpc.RpcError" title="grpc.RpcError"><code class="xref py py-exc docutils literal"><span class="pre">RpcError</span></code></a> &#8211; Indicating that the RPC terminated with non-OK status. The
  723. raised RpcError will also be a Call for the RPC affording the RPC&#8217;s
  724. metadata, status code, and details.</p>
  725. </td>
  726. </tr>
  727. </tbody>
  728. </table>
  729. </dd></dl>
  730. </dd></dl>
  731. <dl class="class">
  732. <dt id="grpc.UnaryStreamMultiCallable">
  733. <em class="property">class </em><code class="descclassname">grpc.</code><code class="descname">UnaryStreamMultiCallable</code><a class="reference internal" href="_modules/grpc.html#UnaryStreamMultiCallable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.UnaryStreamMultiCallable" title="Permalink to this definition">¶</a></dt>
  734. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">abc.NewBase</span></code></p>
  735. <p>Affords invoking a unary-stream RPC.</p>
  736. </dd></dl>
  737. <dl class="class">
  738. <dt id="grpc.StreamUnaryMultiCallable">
  739. <em class="property">class </em><code class="descclassname">grpc.</code><code class="descname">StreamUnaryMultiCallable</code><a class="reference internal" href="_modules/grpc.html#StreamUnaryMultiCallable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.StreamUnaryMultiCallable" title="Permalink to this definition">¶</a></dt>
  740. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">abc.NewBase</span></code></p>
  741. <p>Affords invoking a stream-unary RPC in any call style.</p>
  742. <dl class="method">
  743. <dt id="grpc.StreamUnaryMultiCallable.future">
  744. <code class="descname">future</code><span class="sig-paren">(</span><em>request_iterator</em>, <em>timeout=None</em>, <em>metadata=None</em>, <em>credentials=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#StreamUnaryMultiCallable.future"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.StreamUnaryMultiCallable.future" title="Permalink to this definition">¶</a></dt>
  745. <dd><p>Asynchronously invokes the underlying RPC.</p>
  746. <table class="docutils field-list" frame="void" rules="none">
  747. <col class="field-name" />
  748. <col class="field-body" />
  749. <tbody valign="top">
  750. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  751. <li><strong>request_iterator</strong> &#8211; An iterator that yields request values for the RPC.</li>
  752. <li><strong>timeout</strong> &#8211; An optional duration of time in seconds to allow for the RPC.</li>
  753. <li><strong>metadata</strong> &#8211; An optional sequence of pairs of bytes to be transmitted to the
  754. service-side of the RPC.</li>
  755. <li><strong>credentials</strong> &#8211; An optional CallCredentials for the RPC.</li>
  756. </ul>
  757. </td>
  758. </tr>
  759. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  760. <dt>An object that is both a Call for the RPC and a Future. In the event of</dt>
  761. <dd><p class="first last">RPC completion, the return Future&#8217;s result value will be the response
  762. message of the RPC. Should the event terminate with non-OK status, the
  763. returned Future&#8217;s exception value will be an RpcError.</p>
  764. </dd>
  765. </dl>
  766. </p>
  767. </td>
  768. </tr>
  769. </tbody>
  770. </table>
  771. </dd></dl>
  772. <dl class="method">
  773. <dt id="grpc.StreamUnaryMultiCallable.with_call">
  774. <code class="descname">with_call</code><span class="sig-paren">(</span><em>request_iterator</em>, <em>timeout=None</em>, <em>metadata=None</em>, <em>credentials=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#StreamUnaryMultiCallable.with_call"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.StreamUnaryMultiCallable.with_call" title="Permalink to this definition">¶</a></dt>
  775. <dd><p>Synchronously invokes the underlying RPC.</p>
  776. <table class="docutils field-list" frame="void" rules="none">
  777. <col class="field-name" />
  778. <col class="field-body" />
  779. <tbody valign="top">
  780. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  781. <li><strong>request_iterator</strong> &#8211; An iterator that yields request values for the RPC.</li>
  782. <li><strong>timeout</strong> &#8211; An optional duration of time in seconds to allow for the RPC.</li>
  783. <li><strong>metadata</strong> &#8211; An optional sequence of pairs of bytes to be transmitted to the
  784. service-side of the RPC.</li>
  785. <li><strong>credentials</strong> &#8211; An optional CallCredentials for the RPC.</li>
  786. </ul>
  787. </td>
  788. </tr>
  789. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The response value for the RPC and a Call for the RPC.</p>
  790. </td>
  791. </tr>
  792. <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#grpc.RpcError" title="grpc.RpcError"><code class="xref py py-exc docutils literal"><span class="pre">RpcError</span></code></a> &#8211; Indicating that the RPC terminated with non-OK status. The
  793. raised RpcError will also be a Call for the RPC affording the RPC&#8217;s
  794. metadata, status code, and details.</p>
  795. </td>
  796. </tr>
  797. </tbody>
  798. </table>
  799. </dd></dl>
  800. </dd></dl>
  801. <dl class="class">
  802. <dt id="grpc.StreamStreamMultiCallable">
  803. <em class="property">class </em><code class="descclassname">grpc.</code><code class="descname">StreamStreamMultiCallable</code><a class="reference internal" href="_modules/grpc.html#StreamStreamMultiCallable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.StreamStreamMultiCallable" title="Permalink to this definition">¶</a></dt>
  804. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">abc.NewBase</span></code></p>
  805. <p>Affords invoking a stream-stream RPC in any call style.</p>
  806. </dd></dl>
  807. <dl class="class">
  808. <dt id="grpc.Channel">
  809. <em class="property">class </em><code class="descclassname">grpc.</code><code class="descname">Channel</code><a class="reference internal" href="_modules/grpc.html#Channel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Channel" title="Permalink to this definition">¶</a></dt>
  810. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">abc.NewBase</span></code></p>
  811. <p>Affords RPC invocation via generic methods.</p>
  812. <dl class="method">
  813. <dt id="grpc.Channel.stream_stream">
  814. <code class="descname">stream_stream</code><span class="sig-paren">(</span><em>method</em>, <em>request_serializer=None</em>, <em>response_deserializer=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Channel.stream_stream"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Channel.stream_stream" title="Permalink to this definition">¶</a></dt>
  815. <dd><p>Creates a StreamStreamMultiCallable for a stream-stream method.</p>
  816. <table class="docutils field-list" frame="void" rules="none">
  817. <col class="field-name" />
  818. <col class="field-body" />
  819. <tbody valign="top">
  820. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>method</strong> &#8211; The name of the RPC method.</td>
  821. </tr>
  822. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A StreamStreamMultiCallable value for the named stream-stream method.</td>
  823. </tr>
  824. </tbody>
  825. </table>
  826. </dd></dl>
  827. <dl class="method">
  828. <dt id="grpc.Channel.stream_unary">
  829. <code class="descname">stream_unary</code><span class="sig-paren">(</span><em>method</em>, <em>request_serializer=None</em>, <em>response_deserializer=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Channel.stream_unary"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Channel.stream_unary" title="Permalink to this definition">¶</a></dt>
  830. <dd><p>Creates a StreamUnaryMultiCallable for a stream-unary method.</p>
  831. <table class="docutils field-list" frame="void" rules="none">
  832. <col class="field-name" />
  833. <col class="field-body" />
  834. <tbody valign="top">
  835. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>method</strong> &#8211; The name of the RPC method.</td>
  836. </tr>
  837. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A StreamUnaryMultiCallable value for the named stream-unary method.</td>
  838. </tr>
  839. </tbody>
  840. </table>
  841. </dd></dl>
  842. <dl class="method">
  843. <dt id="grpc.Channel.subscribe">
  844. <code class="descname">subscribe</code><span class="sig-paren">(</span><em>callback</em>, <em>try_to_connect=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Channel.subscribe"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Channel.subscribe" title="Permalink to this definition">¶</a></dt>
  845. <dd><p>Subscribes to this Channel&#8217;s connectivity.</p>
  846. <table class="docutils field-list" frame="void" rules="none">
  847. <col class="field-name" />
  848. <col class="field-body" />
  849. <tbody valign="top">
  850. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  851. <li><strong>callback</strong> &#8211; A callable to be invoked and passed a ChannelConnectivity value
  852. describing this Channel&#8217;s connectivity. The callable will be invoked
  853. immediately upon subscription and again for every change to this
  854. Channel&#8217;s connectivity thereafter until it is unsubscribed or this
  855. Channel object goes out of scope.</li>
  856. <li><strong>try_to_connect</strong> &#8211; A boolean indicating whether or not this Channel should
  857. attempt to connect if it is not already connected and ready to conduct
  858. RPCs.</li>
  859. </ul>
  860. </td>
  861. </tr>
  862. </tbody>
  863. </table>
  864. </dd></dl>
  865. <dl class="method">
  866. <dt id="grpc.Channel.unary_stream">
  867. <code class="descname">unary_stream</code><span class="sig-paren">(</span><em>method</em>, <em>request_serializer=None</em>, <em>response_deserializer=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Channel.unary_stream"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Channel.unary_stream" title="Permalink to this definition">¶</a></dt>
  868. <dd><p>Creates a UnaryStreamMultiCallable for a unary-stream method.</p>
  869. <table class="docutils field-list" frame="void" rules="none">
  870. <col class="field-name" />
  871. <col class="field-body" />
  872. <tbody valign="top">
  873. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>method</strong> &#8211; The name of the RPC method.</td>
  874. </tr>
  875. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A UnaryStreamMultiCallable value for the name unary-stream method.</td>
  876. </tr>
  877. </tbody>
  878. </table>
  879. </dd></dl>
  880. <dl class="method">
  881. <dt id="grpc.Channel.unary_unary">
  882. <code class="descname">unary_unary</code><span class="sig-paren">(</span><em>method</em>, <em>request_serializer=None</em>, <em>response_deserializer=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Channel.unary_unary"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Channel.unary_unary" title="Permalink to this definition">¶</a></dt>
  883. <dd><p>Creates a UnaryUnaryMultiCallable for a unary-unary method.</p>
  884. <table class="docutils field-list" frame="void" rules="none">
  885. <col class="field-name" />
  886. <col class="field-body" />
  887. <tbody valign="top">
  888. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>method</strong> &#8211; The name of the RPC method.</td>
  889. </tr>
  890. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A UnaryUnaryMultiCallable value for the named unary-unary method.</td>
  891. </tr>
  892. </tbody>
  893. </table>
  894. </dd></dl>
  895. <dl class="method">
  896. <dt id="grpc.Channel.unsubscribe">
  897. <code class="descname">unsubscribe</code><span class="sig-paren">(</span><em>callback</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Channel.unsubscribe"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Channel.unsubscribe" title="Permalink to this definition">¶</a></dt>
  898. <dd><p>Unsubscribes a callback from this Channel&#8217;s connectivity.</p>
  899. <table class="docutils field-list" frame="void" rules="none">
  900. <col class="field-name" />
  901. <col class="field-body" />
  902. <tbody valign="top">
  903. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>callback</strong> &#8211; A callable previously registered with this Channel from having
  904. been passed to its &#8220;subscribe&#8221; method.</td>
  905. </tr>
  906. </tbody>
  907. </table>
  908. </dd></dl>
  909. </dd></dl>
  910. <dl class="class">
  911. <dt id="grpc.ServicerContext">
  912. <em class="property">class </em><code class="descclassname">grpc.</code><code class="descname">ServicerContext</code><a class="reference internal" href="_modules/grpc.html#ServicerContext"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.ServicerContext" title="Permalink to this definition">¶</a></dt>
  913. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">abc.NewBase</span></code></p>
  914. <p>A context object passed to method implementations.</p>
  915. <dl class="method">
  916. <dt id="grpc.ServicerContext.invocation_metadata">
  917. <code class="descname">invocation_metadata</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#ServicerContext.invocation_metadata"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.ServicerContext.invocation_metadata" title="Permalink to this definition">¶</a></dt>
  918. <dd><p>Accesses the metadata from the invocation-side of the RPC.</p>
  919. <table class="docutils field-list" frame="void" rules="none">
  920. <col class="field-name" />
  921. <col class="field-body" />
  922. <tbody valign="top">
  923. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The invocation metadata object as a sequence of pairs of bytes.</td>
  924. </tr>
  925. </tbody>
  926. </table>
  927. </dd></dl>
  928. <dl class="method">
  929. <dt id="grpc.ServicerContext.peer">
  930. <code class="descname">peer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#ServicerContext.peer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.ServicerContext.peer" title="Permalink to this definition">¶</a></dt>
  931. <dd><p>Identifies the peer that invoked the RPC being serviced.</p>
  932. <table class="docutils field-list" frame="void" rules="none">
  933. <col class="field-name" />
  934. <col class="field-body" />
  935. <tbody valign="top">
  936. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A string identifying the peer that invoked the RPC being serviced.</td>
  937. </tr>
  938. </tbody>
  939. </table>
  940. </dd></dl>
  941. <dl class="method">
  942. <dt id="grpc.ServicerContext.send_initial_metadata">
  943. <code class="descname">send_initial_metadata</code><span class="sig-paren">(</span><em>initial_metadata</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#ServicerContext.send_initial_metadata"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.ServicerContext.send_initial_metadata" title="Permalink to this definition">¶</a></dt>
  944. <dd><p>Sends the initial metadata value to the invocation-side of the RPC.</p>
  945. <p>This method need not be called by method implementations if they have no
  946. service-side initial metadata to transmit.</p>
  947. <table class="docutils field-list" frame="void" rules="none">
  948. <col class="field-name" />
  949. <col class="field-body" />
  950. <tbody valign="top">
  951. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>initial_metadata</strong> &#8211; The initial metadata of the RPC as a sequence of pairs
  952. of bytes.</td>
  953. </tr>
  954. </tbody>
  955. </table>
  956. </dd></dl>
  957. <dl class="method">
  958. <dt id="grpc.ServicerContext.set_code">
  959. <code class="descname">set_code</code><span class="sig-paren">(</span><em>code</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#ServicerContext.set_code"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.ServicerContext.set_code" title="Permalink to this definition">¶</a></dt>
  960. <dd><p>Accepts the status code of the RPC.</p>
  961. <p>This method need not be called by method implementations if they wish the
  962. gRPC runtime to determine the status code of the RPC.</p>
  963. <table class="docutils field-list" frame="void" rules="none">
  964. <col class="field-name" />
  965. <col class="field-body" />
  966. <tbody valign="top">
  967. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>code</strong> &#8211; The integer status code of the RPC to be transmitted to the
  968. invocation side of the RPC.</td>
  969. </tr>
  970. </tbody>
  971. </table>
  972. </dd></dl>
  973. <dl class="method">
  974. <dt id="grpc.ServicerContext.set_details">
  975. <code class="descname">set_details</code><span class="sig-paren">(</span><em>details</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#ServicerContext.set_details"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.ServicerContext.set_details" title="Permalink to this definition">¶</a></dt>
  976. <dd><p>Accepts the service-side details of the RPC.</p>
  977. <p>This method need not be called by method implementations if they have no
  978. details to transmit.</p>
  979. <table class="docutils field-list" frame="void" rules="none">
  980. <col class="field-name" />
  981. <col class="field-body" />
  982. <tbody valign="top">
  983. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>details</strong> &#8211; The details bytes of the RPC to be transmitted to
  984. the invocation side of the RPC.</td>
  985. </tr>
  986. </tbody>
  987. </table>
  988. </dd></dl>
  989. <dl class="method">
  990. <dt id="grpc.ServicerContext.set_trailing_metadata">
  991. <code class="descname">set_trailing_metadata</code><span class="sig-paren">(</span><em>trailing_metadata</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#ServicerContext.set_trailing_metadata"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.ServicerContext.set_trailing_metadata" title="Permalink to this definition">¶</a></dt>
  992. <dd><p>Accepts the trailing metadata value of the RPC.</p>
  993. <p>This method need not be called by method implementations if they have no
  994. service-side trailing metadata to transmit.</p>
  995. <table class="docutils field-list" frame="void" rules="none">
  996. <col class="field-name" />
  997. <col class="field-body" />
  998. <tbody valign="top">
  999. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>trailing_metadata</strong> &#8211; The trailing metadata of the RPC as a sequence of pairs
  1000. of bytes.</td>
  1001. </tr>
  1002. </tbody>
  1003. </table>
  1004. </dd></dl>
  1005. </dd></dl>
  1006. <dl class="class">
  1007. <dt id="grpc.RpcMethodHandler">
  1008. <em class="property">class </em><code class="descclassname">grpc.</code><code class="descname">RpcMethodHandler</code><a class="reference internal" href="_modules/grpc.html#RpcMethodHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.RpcMethodHandler" title="Permalink to this definition">¶</a></dt>
  1009. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">abc.NewBase</span></code></p>
  1010. <p>An implementation of a single RPC method.</p>
  1011. <dl class="attribute">
  1012. <dt id="grpc.RpcMethodHandler.request_streaming">
  1013. <code class="descname">request_streaming</code><a class="headerlink" href="#grpc.RpcMethodHandler.request_streaming" title="Permalink to this definition">¶</a></dt>
  1014. <dd><p>Whether the RPC supports exactly one request message or
  1015. any arbitrary number of request messages.</p>
  1016. </dd></dl>
  1017. <dl class="attribute">
  1018. <dt id="grpc.RpcMethodHandler.response_streaming">
  1019. <code class="descname">response_streaming</code><a class="headerlink" href="#grpc.RpcMethodHandler.response_streaming" title="Permalink to this definition">¶</a></dt>
  1020. <dd><p>Whether the RPC supports exactly one response message or
  1021. any arbitrary number of response messages.</p>
  1022. </dd></dl>
  1023. <dl class="attribute">
  1024. <dt id="grpc.RpcMethodHandler.request_deserializer">
  1025. <code class="descname">request_deserializer</code><a class="headerlink" href="#grpc.RpcMethodHandler.request_deserializer" title="Permalink to this definition">¶</a></dt>
  1026. <dd><p>A callable behavior that accepts a byte string and
  1027. returns an object suitable to be passed to this object&#8217;s business logic,
  1028. or None to indicate that this object&#8217;s business logic should be passed the
  1029. raw request bytes.</p>
  1030. </dd></dl>
  1031. <dl class="attribute">
  1032. <dt id="grpc.RpcMethodHandler.response_serializer">
  1033. <code class="descname">response_serializer</code><a class="headerlink" href="#grpc.RpcMethodHandler.response_serializer" title="Permalink to this definition">¶</a></dt>
  1034. <dd><p>A callable behavior that accepts an object produced by
  1035. this object&#8217;s business logic and returns a byte string, or None to
  1036. indicate that the byte strings produced by this object&#8217;s business logic
  1037. should be transmitted on the wire as they are.</p>
  1038. </dd></dl>
  1039. <dl class="attribute">
  1040. <dt id="grpc.RpcMethodHandler.unary_unary">
  1041. <code class="descname">unary_unary</code><a class="headerlink" href="#grpc.RpcMethodHandler.unary_unary" title="Permalink to this definition">¶</a></dt>
  1042. <dd><p>This object&#8217;s application-specific business logic as a callable
  1043. value that takes a request value and a ServicerContext object and returns
  1044. a response value. Only non-None if both request_streaming and
  1045. response_streaming are False.</p>
  1046. </dd></dl>
  1047. <dl class="attribute">
  1048. <dt id="grpc.RpcMethodHandler.unary_stream">
  1049. <code class="descname">unary_stream</code><a class="headerlink" href="#grpc.RpcMethodHandler.unary_stream" title="Permalink to this definition">¶</a></dt>
  1050. <dd><p>This object&#8217;s application-specific business logic as a
  1051. callable value that takes a request value and a ServicerContext object and
  1052. returns an iterator of response values. Only non-None if request_streaming
  1053. is False and response_streaming is True.</p>
  1054. </dd></dl>
  1055. <dl class="attribute">
  1056. <dt id="grpc.RpcMethodHandler.stream_unary">
  1057. <code class="descname">stream_unary</code><a class="headerlink" href="#grpc.RpcMethodHandler.stream_unary" title="Permalink to this definition">¶</a></dt>
  1058. <dd><p>This object&#8217;s application-specific business logic as a
  1059. callable value that takes an iterator of request values and a
  1060. ServicerContext object and returns a response value. Only non-None if
  1061. request_streaming is True and response_streaming is False.</p>
  1062. </dd></dl>
  1063. <dl class="attribute">
  1064. <dt id="grpc.RpcMethodHandler.stream_stream">
  1065. <code class="descname">stream_stream</code><a class="headerlink" href="#grpc.RpcMethodHandler.stream_stream" title="Permalink to this definition">¶</a></dt>
  1066. <dd><p>This object&#8217;s application-specific business logic as a
  1067. callable value that takes an iterator of request values and a
  1068. ServicerContext object and returns an iterator of response values. Only
  1069. non-None if request_streaming and response_streaming are both True.</p>
  1070. </dd></dl>
  1071. </dd></dl>
  1072. <dl class="class">
  1073. <dt id="grpc.HandlerCallDetails">
  1074. <em class="property">class </em><code class="descclassname">grpc.</code><code class="descname">HandlerCallDetails</code><a class="reference internal" href="_modules/grpc.html#HandlerCallDetails"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.HandlerCallDetails" title="Permalink to this definition">¶</a></dt>
  1075. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">abc.NewBase</span></code></p>
  1076. <p>Describes an RPC that has just arrived for service.
  1077. .. attribute:: method</p>
  1078. <blockquote>
  1079. <div>The method name of the RPC.</div></blockquote>
  1080. <dl class="attribute">
  1081. <dt id="grpc.HandlerCallDetails.invocation_metadata">
  1082. <code class="descname">invocation_metadata</code><a class="headerlink" href="#grpc.HandlerCallDetails.invocation_metadata" title="Permalink to this definition">¶</a></dt>
  1083. <dd><p>The metadata from the invocation side of the RPC.</p>
  1084. </dd></dl>
  1085. </dd></dl>
  1086. <dl class="class">
  1087. <dt id="grpc.GenericRpcHandler">
  1088. <em class="property">class </em><code class="descclassname">grpc.</code><code class="descname">GenericRpcHandler</code><a class="reference internal" href="_modules/grpc.html#GenericRpcHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.GenericRpcHandler" title="Permalink to this definition">¶</a></dt>
  1089. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">abc.NewBase</span></code></p>
  1090. <p>An implementation of arbitrarily many RPC methods.</p>
  1091. <dl class="method">
  1092. <dt id="grpc.GenericRpcHandler.service">
  1093. <code class="descname">service</code><span class="sig-paren">(</span><em>handler_call_details</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#GenericRpcHandler.service"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.GenericRpcHandler.service" title="Permalink to this definition">¶</a></dt>
  1094. <dd><p>Services an RPC (or not).</p>
  1095. <table class="docutils field-list" frame="void" rules="none">
  1096. <col class="field-name" />
  1097. <col class="field-body" />
  1098. <tbody valign="top">
  1099. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>handler_call_details</strong> &#8211; A HandlerCallDetails describing the RPC.</td>
  1100. </tr>
  1101. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="docutils">
  1102. <dt>An RpcMethodHandler with which the RPC may be serviced, or None to</dt>
  1103. <dd>indicate that this object will not be servicing the RPC.</dd>
  1104. </dl>
  1105. </td>
  1106. </tr>
  1107. </tbody>
  1108. </table>
  1109. </dd></dl>
  1110. </dd></dl>
  1111. <dl class="class">
  1112. <dt id="grpc.Server">
  1113. <em class="property">class </em><code class="descclassname">grpc.</code><code class="descname">Server</code><a class="reference internal" href="_modules/grpc.html#Server"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Server" title="Permalink to this definition">¶</a></dt>
  1114. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">abc.NewBase</span></code></p>
  1115. <p>Services RPCs.</p>
  1116. <dl class="method">
  1117. <dt id="grpc.Server.add_generic_rpc_handlers">
  1118. <code class="descname">add_generic_rpc_handlers</code><span class="sig-paren">(</span><em>generic_rpc_handlers</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Server.add_generic_rpc_handlers"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Server.add_generic_rpc_handlers" title="Permalink to this definition">¶</a></dt>
  1119. <dd><p>Registers GenericRpcHandlers with this Server.</p>
  1120. <p>This method is only safe to call before the server is started.</p>
  1121. <table class="docutils field-list" frame="void" rules="none">
  1122. <col class="field-name" />
  1123. <col class="field-body" />
  1124. <tbody valign="top">
  1125. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>generic_rpc_handlers</strong> &#8211; An iterable of GenericRpcHandlers that will be used
  1126. to service RPCs after this Server is started.</td>
  1127. </tr>
  1128. </tbody>
  1129. </table>
  1130. </dd></dl>
  1131. <dl class="method">
  1132. <dt id="grpc.Server.add_insecure_port">
  1133. <code class="descname">add_insecure_port</code><span class="sig-paren">(</span><em>address</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Server.add_insecure_port"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Server.add_insecure_port" title="Permalink to this definition">¶</a></dt>
  1134. <dd><p>Reserves a port for insecure RPC service once this Server becomes active.</p>
  1135. <p>This method may only be called before calling this Server&#8217;s start method is
  1136. called.</p>
  1137. <table class="docutils field-list" frame="void" rules="none">
  1138. <col class="field-name" />
  1139. <col class="field-body" />
  1140. <tbody valign="top">
  1141. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>address</strong> &#8211; The address for which to open a port.</td>
  1142. </tr>
  1143. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="docutils">
  1144. <dt>An integer port on which RPCs will be serviced after this link has been</dt>
  1145. <dd>started. This is typically the same number as the port number contained
  1146. in the passed address, but will likely be different if the port number
  1147. contained in the passed address was zero.</dd>
  1148. </dl>
  1149. </td>
  1150. </tr>
  1151. </tbody>
  1152. </table>
  1153. </dd></dl>
  1154. <dl class="method">
  1155. <dt id="grpc.Server.add_secure_port">
  1156. <code class="descname">add_secure_port</code><span class="sig-paren">(</span><em>address</em>, <em>server_credentials</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Server.add_secure_port"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Server.add_secure_port" title="Permalink to this definition">¶</a></dt>
  1157. <dd><p>Reserves a port for secure RPC service after this Server becomes active.</p>
  1158. <p>This method may only be called before calling this Server&#8217;s start method is
  1159. called.</p>
  1160. <table class="docutils field-list" frame="void" rules="none">
  1161. <col class="field-name" />
  1162. <col class="field-body" />
  1163. <tbody valign="top">
  1164. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1165. <li><strong>address</strong> &#8211; The address for which to open a port.</li>
  1166. <li><strong>server_credentials</strong> &#8211; A ServerCredentials.</li>
  1167. </ul>
  1168. </td>
  1169. </tr>
  1170. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  1171. <dt>An integer port on which RPCs will be serviced after this link has been</dt>
  1172. <dd><p class="first last">started. This is typically the same number as the port number contained
  1173. in the passed address, but will likely be different if the port number
  1174. contained in the passed address was zero.</p>
  1175. </dd>
  1176. </dl>
  1177. </p>
  1178. </td>
  1179. </tr>
  1180. </tbody>
  1181. </table>
  1182. </dd></dl>
  1183. <dl class="method">
  1184. <dt id="grpc.Server.start">
  1185. <code class="descname">start</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Server.start"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Server.start" title="Permalink to this definition">¶</a></dt>
  1186. <dd><p>Starts this Server&#8217;s service of RPCs.</p>
  1187. <p>This method may only be called while the server is not serving RPCs (i.e. it
  1188. is not idempotent).</p>
  1189. </dd></dl>
  1190. <dl class="method">
  1191. <dt id="grpc.Server.stop">
  1192. <code class="descname">stop</code><span class="sig-paren">(</span><em>grace</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#Server.stop"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.Server.stop" title="Permalink to this definition">¶</a></dt>
  1193. <dd><p>Stops this Server&#8217;s service of RPCs.</p>
  1194. <p>All calls to this method immediately stop service of new RPCs. When existing
  1195. RPCs are aborted is controlled by the grace period parameter passed to this
  1196. method.</p>
  1197. <p>This method may be called at any time and is idempotent. Passing a smaller
  1198. grace value than has been passed in a previous call will have the effect of
  1199. stopping the Server sooner. Passing a larger grace value than has been
  1200. passed in a previous call will not have the effect of stopping the server
  1201. later.</p>
  1202. <table class="docutils field-list" frame="void" rules="none">
  1203. <col class="field-name" />
  1204. <col class="field-body" />
  1205. <tbody valign="top">
  1206. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>grace</strong> &#8211; A duration of time in seconds to allow existing RPCs to complete
  1207. before being aborted by this Server&#8217;s stopping. If None, this method
  1208. will block until the server is completely stopped.</td>
  1209. </tr>
  1210. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A threading.Event that will be set when this Server has completely
  1211. stopped. The returned event may not be set until after the full grace
  1212. period (if some ongoing RPC continues for the full length of the period)
  1213. of it may be set much sooner (such as if this Server had no RPCs underway
  1214. at the time it was stopped or if all RPCs that it had underway completed
  1215. very early in the grace period).</td>
  1216. </tr>
  1217. </tbody>
  1218. </table>
  1219. </dd></dl>
  1220. </dd></dl>
  1221. <dl class="function">
  1222. <dt id="grpc.unary_unary_rpc_method_handler">
  1223. <code class="descclassname">grpc.</code><code class="descname">unary_unary_rpc_method_handler</code><span class="sig-paren">(</span><em>behavior</em>, <em>request_deserializer=None</em>, <em>response_serializer=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#unary_unary_rpc_method_handler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.unary_unary_rpc_method_handler" title="Permalink to this definition">¶</a></dt>
  1224. <dd><p>Creates an RpcMethodHandler for a unary-unary RPC method.</p>
  1225. <table class="docutils field-list" frame="void" rules="none">
  1226. <col class="field-name" />
  1227. <col class="field-body" />
  1228. <tbody valign="top">
  1229. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1230. <li><strong>behavior</strong> &#8211; The implementation of an RPC method as a callable behavior taking
  1231. a single request value and returning a single response value.</li>
  1232. <li><strong>request_deserializer</strong> &#8211; An optional request deserialization behavior.</li>
  1233. <li><strong>response_serializer</strong> &#8211; An optional response serialization behavior.</li>
  1234. </ul>
  1235. </td>
  1236. </tr>
  1237. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  1238. <dt>An RpcMethodHandler for a unary-unary RPC method constructed from the given</dt>
  1239. <dd><p class="first last">parameters.</p>
  1240. </dd>
  1241. </dl>
  1242. </p>
  1243. </td>
  1244. </tr>
  1245. </tbody>
  1246. </table>
  1247. </dd></dl>
  1248. <dl class="function">
  1249. <dt id="grpc.unary_stream_rpc_method_handler">
  1250. <code class="descclassname">grpc.</code><code class="descname">unary_stream_rpc_method_handler</code><span class="sig-paren">(</span><em>behavior</em>, <em>request_deserializer=None</em>, <em>response_serializer=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#unary_stream_rpc_method_handler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.unary_stream_rpc_method_handler" title="Permalink to this definition">¶</a></dt>
  1251. <dd><p>Creates an RpcMethodHandler for a unary-stream RPC method.</p>
  1252. <table class="docutils field-list" frame="void" rules="none">
  1253. <col class="field-name" />
  1254. <col class="field-body" />
  1255. <tbody valign="top">
  1256. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1257. <li><strong>behavior</strong> &#8211; The implementation of an RPC method as a callable behavior taking
  1258. a single request value and returning an iterator of response values.</li>
  1259. <li><strong>request_deserializer</strong> &#8211; An optional request deserialization behavior.</li>
  1260. <li><strong>response_serializer</strong> &#8211; An optional response serialization behavior.</li>
  1261. </ul>
  1262. </td>
  1263. </tr>
  1264. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  1265. <dt>An RpcMethodHandler for a unary-stream RPC method constructed from the</dt>
  1266. <dd><p class="first last">given parameters.</p>
  1267. </dd>
  1268. </dl>
  1269. </p>
  1270. </td>
  1271. </tr>
  1272. </tbody>
  1273. </table>
  1274. </dd></dl>
  1275. <dl class="function">
  1276. <dt id="grpc.stream_unary_rpc_method_handler">
  1277. <code class="descclassname">grpc.</code><code class="descname">stream_unary_rpc_method_handler</code><span class="sig-paren">(</span><em>behavior</em>, <em>request_deserializer=None</em>, <em>response_serializer=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#stream_unary_rpc_method_handler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.stream_unary_rpc_method_handler" title="Permalink to this definition">¶</a></dt>
  1278. <dd><p>Creates an RpcMethodHandler for a stream-unary RPC method.</p>
  1279. <table class="docutils field-list" frame="void" rules="none">
  1280. <col class="field-name" />
  1281. <col class="field-body" />
  1282. <tbody valign="top">
  1283. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1284. <li><strong>behavior</strong> &#8211; The implementation of an RPC method as a callable behavior taking
  1285. an iterator of request values and returning a single response value.</li>
  1286. <li><strong>request_deserializer</strong> &#8211; An optional request deserialization behavior.</li>
  1287. <li><strong>response_serializer</strong> &#8211; An optional response serialization behavior.</li>
  1288. </ul>
  1289. </td>
  1290. </tr>
  1291. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  1292. <dt>An RpcMethodHandler for a stream-unary RPC method constructed from the</dt>
  1293. <dd><p class="first last">given parameters.</p>
  1294. </dd>
  1295. </dl>
  1296. </p>
  1297. </td>
  1298. </tr>
  1299. </tbody>
  1300. </table>
  1301. </dd></dl>
  1302. <dl class="function">
  1303. <dt id="grpc.stream_stream_rpc_method_handler">
  1304. <code class="descclassname">grpc.</code><code class="descname">stream_stream_rpc_method_handler</code><span class="sig-paren">(</span><em>behavior</em>, <em>request_deserializer=None</em>, <em>response_serializer=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#stream_stream_rpc_method_handler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.stream_stream_rpc_method_handler" title="Permalink to this definition">¶</a></dt>
  1305. <dd><p>Creates an RpcMethodHandler for a stream-stream RPC method.</p>
  1306. <table class="docutils field-list" frame="void" rules="none">
  1307. <col class="field-name" />
  1308. <col class="field-body" />
  1309. <tbody valign="top">
  1310. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1311. <li><strong>behavior</strong> &#8211; The implementation of an RPC method as a callable behavior taking
  1312. an iterator of request values and returning an iterator of response
  1313. values.</li>
  1314. <li><strong>request_deserializer</strong> &#8211; An optional request deserialization behavior.</li>
  1315. <li><strong>response_serializer</strong> &#8211; An optional response serialization behavior.</li>
  1316. </ul>
  1317. </td>
  1318. </tr>
  1319. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  1320. <dt>An RpcMethodHandler for a stream-stream RPC method constructed from the</dt>
  1321. <dd><p class="first last">given parameters.</p>
  1322. </dd>
  1323. </dl>
  1324. </p>
  1325. </td>
  1326. </tr>
  1327. </tbody>
  1328. </table>
  1329. </dd></dl>
  1330. <dl class="function">
  1331. <dt id="grpc.method_handlers_generic_handler">
  1332. <code class="descclassname">grpc.</code><code class="descname">method_handlers_generic_handler</code><span class="sig-paren">(</span><em>service</em>, <em>method_handlers</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#method_handlers_generic_handler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.method_handlers_generic_handler" title="Permalink to this definition">¶</a></dt>
  1333. <dd><p>Creates a grpc.GenericRpcHandler from RpcMethodHandlers.</p>
  1334. <table class="docutils field-list" frame="void" rules="none">
  1335. <col class="field-name" />
  1336. <col class="field-body" />
  1337. <tbody valign="top">
  1338. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1339. <li><strong>service</strong> &#8211; A service name to be used for the given method handlers.</li>
  1340. <li><strong>method_handlers</strong> &#8211; A dictionary from method name to RpcMethodHandler
  1341. implementing the named method.</li>
  1342. </ul>
  1343. </td>
  1344. </tr>
  1345. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A GenericRpcHandler constructed from the given parameters.</p>
  1346. </td>
  1347. </tr>
  1348. </tbody>
  1349. </table>
  1350. </dd></dl>
  1351. <dl class="function">
  1352. <dt id="grpc.ssl_channel_credentials">
  1353. <code class="descclassname">grpc.</code><code class="descname">ssl_channel_credentials</code><span class="sig-paren">(</span><em>root_certificates=None</em>, <em>private_key=None</em>, <em>certificate_chain=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#ssl_channel_credentials"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.ssl_channel_credentials" title="Permalink to this definition">¶</a></dt>
  1354. <dd><p>Creates a ChannelCredentials for use with an SSL-enabled Channel.</p>
  1355. <table class="docutils field-list" frame="void" rules="none">
  1356. <col class="field-name" />
  1357. <col class="field-body" />
  1358. <tbody valign="top">
  1359. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1360. <li><strong>root_certificates</strong> &#8211; The PEM-encoded root certificates or unset to ask for
  1361. them to be retrieved from a default location.</li>
  1362. <li><strong>private_key</strong> &#8211; The PEM-encoded private key to use or unset if no private key
  1363. should be used.</li>
  1364. <li><strong>certificate_chain</strong> &#8211; The PEM-encoded certificate chain to use or unset if no
  1365. certificate chain should be used.</li>
  1366. </ul>
  1367. </td>
  1368. </tr>
  1369. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A ChannelCredentials for use with an SSL-enabled Channel.</p>
  1370. </td>
  1371. </tr>
  1372. </tbody>
  1373. </table>
  1374. </dd></dl>
  1375. <dl class="function">
  1376. <dt id="grpc.metadata_call_credentials">
  1377. <code class="descclassname">grpc.</code><code class="descname">metadata_call_credentials</code><span class="sig-paren">(</span><em>metadata_plugin</em>, <em>name=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#metadata_call_credentials"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.metadata_call_credentials" title="Permalink to this definition">¶</a></dt>
  1378. <dd><p>Construct CallCredentials from an AuthMetadataPlugin.</p>
  1379. <table class="docutils field-list" frame="void" rules="none">
  1380. <col class="field-name" />
  1381. <col class="field-body" />
  1382. <tbody valign="top">
  1383. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1384. <li><strong>metadata_plugin</strong> &#8211; An AuthMetadataPlugin to use as the authentication behavior
  1385. in the created CallCredentials.</li>
  1386. <li><strong>name</strong> &#8211; A name for the plugin.</li>
  1387. </ul>
  1388. </td>
  1389. </tr>
  1390. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A CallCredentials.</p>
  1391. </td>
  1392. </tr>
  1393. </tbody>
  1394. </table>
  1395. </dd></dl>
  1396. <dl class="function">
  1397. <dt id="grpc.access_token_call_credentials">
  1398. <code class="descclassname">grpc.</code><code class="descname">access_token_call_credentials</code><span class="sig-paren">(</span><em>access_token</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#access_token_call_credentials"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.access_token_call_credentials" title="Permalink to this definition">¶</a></dt>
  1399. <dd><p>Construct CallCredentials from an access token.</p>
  1400. <table class="docutils field-list" frame="void" rules="none">
  1401. <col class="field-name" />
  1402. <col class="field-body" />
  1403. <tbody valign="top">
  1404. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>access_token</strong> &#8211; A string to place directly in the http request
  1405. authorization header, ie &#8220;Authorization: Bearer &lt;access_token&gt;&#8221;.</td>
  1406. </tr>
  1407. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A CallCredentials.</td>
  1408. </tr>
  1409. </tbody>
  1410. </table>
  1411. </dd></dl>
  1412. <dl class="function">
  1413. <dt id="grpc.composite_call_credentials">
  1414. <code class="descclassname">grpc.</code><code class="descname">composite_call_credentials</code><span class="sig-paren">(</span><em>call_credentials</em>, <em>additional_call_credentials</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#composite_call_credentials"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.composite_call_credentials" title="Permalink to this definition">¶</a></dt>
  1415. <dd><p>Compose two CallCredentials to make a new one.</p>
  1416. <table class="docutils field-list" frame="void" rules="none">
  1417. <col class="field-name" />
  1418. <col class="field-body" />
  1419. <tbody valign="top">
  1420. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1421. <li><strong>call_credentials</strong> &#8211; A CallCredentials object.</li>
  1422. <li><strong>additional_call_credentials</strong> &#8211; Another CallCredentials object to compose on
  1423. top of call_credentials.</li>
  1424. </ul>
  1425. </td>
  1426. </tr>
  1427. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A new CallCredentials composed of the two given CallCredentials.</p>
  1428. </td>
  1429. </tr>
  1430. </tbody>
  1431. </table>
  1432. </dd></dl>
  1433. <dl class="function">
  1434. <dt id="grpc.composite_channel_credentials">
  1435. <code class="descclassname">grpc.</code><code class="descname">composite_channel_credentials</code><span class="sig-paren">(</span><em>channel_credentials</em>, <em>call_credentials</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#composite_channel_credentials"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.composite_channel_credentials" title="Permalink to this definition">¶</a></dt>
  1436. <dd><p>Compose a ChannelCredentials and a CallCredentials.</p>
  1437. <table class="docutils field-list" frame="void" rules="none">
  1438. <col class="field-name" />
  1439. <col class="field-body" />
  1440. <tbody valign="top">
  1441. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1442. <li><strong>channel_credentials</strong> &#8211; A ChannelCredentials.</li>
  1443. <li><strong>call_credentials</strong> &#8211; A CallCredentials.</li>
  1444. </ul>
  1445. </td>
  1446. </tr>
  1447. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  1448. <dt>A ChannelCredentials composed of the given ChannelCredentials and</dt>
  1449. <dd><p class="first last">CallCredentials.</p>
  1450. </dd>
  1451. </dl>
  1452. </p>
  1453. </td>
  1454. </tr>
  1455. </tbody>
  1456. </table>
  1457. </dd></dl>
  1458. <dl class="function">
  1459. <dt id="grpc.ssl_server_credentials">
  1460. <code class="descclassname">grpc.</code><code class="descname">ssl_server_credentials</code><span class="sig-paren">(</span><em>private_key_certificate_chain_pairs</em>, <em>root_certificates=None</em>, <em>require_client_auth=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#ssl_server_credentials"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.ssl_server_credentials" title="Permalink to this definition">¶</a></dt>
  1461. <dd><p>Creates a ServerCredentials for use with an SSL-enabled Server.</p>
  1462. <table class="docutils field-list" frame="void" rules="none">
  1463. <col class="field-name" />
  1464. <col class="field-body" />
  1465. <tbody valign="top">
  1466. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1467. <li><strong>private_key_certificate_chain_pairs</strong> &#8211; A nonempty sequence each element of
  1468. which is a pair the first element of which is a PEM-encoded private key
  1469. and the second element of which is the corresponding PEM-encoded
  1470. certificate chain.</li>
  1471. <li><strong>root_certificates</strong> &#8211; PEM-encoded client root certificates to be used for
  1472. verifying authenticated clients. If omitted, require_client_auth must also
  1473. be omitted or be False.</li>
  1474. <li><strong>require_client_auth</strong> &#8211; A boolean indicating whether or not to require clients
  1475. to be authenticated. May only be True if root_certificates is not None.</li>
  1476. </ul>
  1477. </td>
  1478. </tr>
  1479. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A ServerCredentials for use with an SSL-enabled Server.</p>
  1480. </td>
  1481. </tr>
  1482. </tbody>
  1483. </table>
  1484. </dd></dl>
  1485. <dl class="function">
  1486. <dt id="grpc.channel_ready_future">
  1487. <code class="descclassname">grpc.</code><code class="descname">channel_ready_future</code><span class="sig-paren">(</span><em>channel</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#channel_ready_future"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.channel_ready_future" title="Permalink to this definition">¶</a></dt>
  1488. <dd><p>Creates a Future tracking when a Channel is ready.</p>
  1489. <p>Cancelling the returned Future does not tell the given Channel to abandon
  1490. attempts it may have been making to connect; cancelling merely deactivates the
  1491. returned Future&#8217;s subscription to the given Channel&#8217;s connectivity.</p>
  1492. <table class="docutils field-list" frame="void" rules="none">
  1493. <col class="field-name" />
  1494. <col class="field-body" />
  1495. <tbody valign="top">
  1496. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>channel</strong> &#8211; A Channel.</td>
  1497. </tr>
  1498. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="docutils">
  1499. <dt>A Future that matures when the given Channel has connectivity</dt>
  1500. <dd>ChannelConnectivity.READY.</dd>
  1501. </dl>
  1502. </td>
  1503. </tr>
  1504. </tbody>
  1505. </table>
  1506. </dd></dl>
  1507. <dl class="function">
  1508. <dt id="grpc.insecure_channel">
  1509. <code class="descclassname">grpc.</code><code class="descname">insecure_channel</code><span class="sig-paren">(</span><em>target</em>, <em>options=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#insecure_channel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.insecure_channel" title="Permalink to this definition">¶</a></dt>
  1510. <dd><p>Creates an insecure Channel to a server.</p>
  1511. <table class="docutils field-list" frame="void" rules="none">
  1512. <col class="field-name" />
  1513. <col class="field-body" />
  1514. <tbody valign="top">
  1515. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1516. <li><strong>target</strong> &#8211; The target to which to connect.</li>
  1517. <li><strong>options</strong> &#8211; A sequence of string-value pairs according to which to configure
  1518. the created channel.</li>
  1519. </ul>
  1520. </td>
  1521. </tr>
  1522. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A Channel to the target through which RPCs may be conducted.</p>
  1523. </td>
  1524. </tr>
  1525. </tbody>
  1526. </table>
  1527. </dd></dl>
  1528. <dl class="function">
  1529. <dt id="grpc.secure_channel">
  1530. <code class="descclassname">grpc.</code><code class="descname">secure_channel</code><span class="sig-paren">(</span><em>target</em>, <em>credentials</em>, <em>options=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#secure_channel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.secure_channel" title="Permalink to this definition">¶</a></dt>
  1531. <dd><p>Creates an insecure Channel to a server.</p>
  1532. <table class="docutils field-list" frame="void" rules="none">
  1533. <col class="field-name" />
  1534. <col class="field-body" />
  1535. <tbody valign="top">
  1536. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1537. <li><strong>target</strong> &#8211; The target to which to connect.</li>
  1538. <li><strong>credentials</strong> &#8211; A ChannelCredentials instance.</li>
  1539. <li><strong>options</strong> &#8211; A sequence of string-value pairs according to which to configure
  1540. the created channel.</li>
  1541. </ul>
  1542. </td>
  1543. </tr>
  1544. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A Channel to the target through which RPCs may be conducted.</p>
  1545. </td>
  1546. </tr>
  1547. </tbody>
  1548. </table>
  1549. </dd></dl>
  1550. <dl class="function">
  1551. <dt id="grpc.server">
  1552. <code class="descclassname">grpc.</code><code class="descname">server</code><span class="sig-paren">(</span><em>generic_rpc_handlers</em>, <em>thread_pool</em>, <em>options=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc.html#server"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.server" title="Permalink to this definition">¶</a></dt>
  1553. <dd><p>Creates a Server with which RPCs can be serviced.</p>
  1554. <p>The GenericRpcHandlers passed to this function needn&#8217;t be the only
  1555. GenericRpcHandlers that will be used to serve RPCs; others may be added later
  1556. by calling add_generic_rpc_handlers any time before the returned server is
  1557. started.</p>
  1558. <table class="docutils field-list" frame="void" rules="none">
  1559. <col class="field-name" />
  1560. <col class="field-body" />
  1561. <tbody valign="top">
  1562. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1563. <li><strong>generic_rpc_handlers</strong> &#8211; Some number of GenericRpcHandlers that will be used
  1564. to service RPCs after the returned Server is started.</li>
  1565. <li><strong>thread_pool</strong> &#8211; A futures.ThreadPoolExecutor to be used by the returned Server
  1566. to service RPCs.</li>
  1567. </ul>
  1568. </td>
  1569. </tr>
  1570. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A Server with which RPCs can be serviced.</p>
  1571. </td>
  1572. </tr>
  1573. </tbody>
  1574. </table>
  1575. </dd></dl>
  1576. </div>
  1577. </div>
  1578. </div>
  1579. </div>
  1580. <footer>
  1581. <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
  1582. <a href="grpc.beta.html" class="btn btn-neutral float-right" title="grpc.beta package" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
  1583. <a href="index.html" class="btn btn-neutral" title="Welcome to grpcio’s documentation!" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
  1584. </div>
  1585. <hr/>
  1586. <div role="contentinfo">
  1587. <p>
  1588. &copy; Copyright 2016, Author.
  1589. </p>
  1590. </div>
  1591. 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>.
  1592. </footer>
  1593. </div>
  1594. </div>
  1595. </section>
  1596. </div>
  1597. <script type="text/javascript">
  1598. var DOCUMENTATION_OPTIONS = {
  1599. URL_ROOT:'./',
  1600. VERSION:'0.15.0',
  1601. COLLAPSE_INDEX:false,
  1602. FILE_SUFFIX:'.html',
  1603. HAS_SOURCE: true
  1604. };
  1605. </script>
  1606. <script type="text/javascript" src="_static/jquery.js"></script>
  1607. <script type="text/javascript" src="_static/underscore.js"></script>
  1608. <script type="text/javascript" src="_static/doctools.js"></script>
  1609. <script type="text/javascript" src="_static/js/theme.js"></script>
  1610. <script type="text/javascript">
  1611. jQuery(function () {
  1612. SphinxRtdTheme.StickyNav.enable();
  1613. });
  1614. </script>
  1615. </body>
  1616. </html>