is "from flask import request" identical to "import requests"?
<p>In other words, is the flask request class identical to the requests library?</p>

<p>I consulted:</p>

<p><a href="http://flask.pocoo.org/docs/0.11/api/" rel="nofollow">http://flask.pocoo.org/docs/0.11/api/</a></p>

<p><a href="http://docs.python-requests.org/en/master/" rel="nofollow">http://docs.python-requests.org/en/master/</a></p>

<p>but cannot tell for sure. I see code examples where people seem to use them interchangeably.</p>

<p>Just want to add something that I think it might be useful, when we use:
<code>from some_module import something</code>, it means we import just a part of the module, <code>something</code> might be a function for example, so if we need only one function from a specific module, it is better to import just that one function instead of importing the whole module (I mean from optimization perspective). So this gives another difference between the two imports you mentioned above.</p>

<p>The following one means you are importing only a part (request) of the module / library (flask)</p>

<pre><code>from flask import request
</code></pre>

<p>And the second one means you are importing the entire module / library (requests)</p>

<pre><code>import requests
</code></pre>

python flask python-requests