<p dir="auto">My app doesn't need <code class="notranslate">werkzeug</code> directly except for type annotations of views that contain a <code class="notranslate">redirect</code> call, even when I explicitly provide <code class="notranslate">Response=flask.Response</code>.<br>
</p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/pallets/flask/blob/5cdfeae2e82541577e17f5179d91775550e34ebd/src/flask/helpers.py#L233-L235">flask/src/flask/helpers.py</a>
    </p>
    <p class="mb-0 color-fg-muted">
        Lines 233 to 235
      in
      <a data-pjax="true" class="commit-tease-sha" href="/pallets/flask/commit/5cdfeae2e82541577e17f5179d91775550e34ebd">5cdfeae</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L233" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="233"></td>
          <td id="LC233" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">def</span> <span class="pl-en">redirect</span>( </td>
        </tr>

        <tr class="border-0">
          <td id="L234" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="234"></td>
          <td id="LC234" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     <span class="pl-s1">location</span>: <span class="pl-s1">str</span>, <span class="pl-s1">code</span>: <span class="pl-s1">int</span> <span class="pl-c1">=</span> <span class="pl-c1">302</span>, <span class="pl-v">Response</span>: <span class="pl-s1">t</span>.<span class="pl-v">Optional</span>[<span class="pl-s1">t</span>.<span class="pl-v">Type</span>[<span class="pl-s">"BaseResponse"</span>]] <span class="pl-c1">=</span> <span class="pl-c1">None</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L235" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="235"></td>
          <td id="LC235" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> ) <span class="pl-c1">-&gt;</span> <span class="pl-s">"BaseResponse"</span>: </td>
        </tr>
    </tbody></table>
  </div>
</div>
<br>
I think this can be achieved in a similar way to <code class="notranslate">classmethod</code>s:<p></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="_BaseResponse = t.TypeVar(&quot;_BaseResponse&quot;, bound=&quot;BaseResponse&quot;)

def redirect( 
    location: str, code: int = 302, Response: t.Optional[t.Type[_BaseResponse]] = None 
) -&gt; _BaseResponse:"><pre class="notranslate"><span class="pl-s1">_BaseResponse</span> <span class="pl-c1">=</span> <span class="pl-s1">t</span>.<span class="pl-v">TypeVar</span>(<span class="pl-s">"_BaseResponse"</span>, <span class="pl-s1">bound</span><span class="pl-c1">=</span><span class="pl-s">"BaseResponse"</span>)

<span class="pl-k">def</span> <span class="pl-en">redirect</span>( 
    <span class="pl-s1">location</span>: <span class="pl-s1">str</span>, <span class="pl-s1">code</span>: <span class="pl-s1">int</span> <span class="pl-c1">=</span> <span class="pl-c1">302</span>, <span class="pl-v">Response</span>: <span class="pl-s1">t</span>.<span class="pl-v">Optional</span>[<span class="pl-s1">t</span>.<span class="pl-v">Type</span>[<span class="pl-s1">_BaseResponse</span>]] <span class="pl-c1">=</span> <span class="pl-c1">None</span> 
) <span class="pl-c1">-&gt;</span> <span class="pl-s1">_BaseResponse</span>:</pre></div>
<p dir="auto">I have been having issues for 3-4 days now to get a hello world up and running on the remote server. I figured out that it would be nice if there was a documentation from A-Z how to get that done and working.</p>
<p dir="auto"><a href="http://flask.pocoo.org/docs/deploying/mod_wsgi/" rel="nofollow">http://flask.pocoo.org/docs/deploying/mod_wsgi/</a></p>
<p dir="auto">The current documentation does not provide an example what to put into an exact python file, and what url to open up in the web browser to get the desired python module running on the remote server. It is okay to have references to other places if that is more logical, but the idea is to have a self-contained page which I can start reading, and by I reach the end, I will have a working remote hello world.</p>
<p dir="auto">This would be well appreciated.</p>