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>No these are not only completely different libraries, but completely different purposes.</p>

<p>Flask is a web framework which clients make requests to. The Flask <code>request</code> object contains the data that the client (eg a browser) has sent to your app - ie the URL parameters, any POST data, etc.</p>

<p>The requests library is for your app to make HTTP request to <em>other</em> sites, usually APIs. It makes an outgoing request and returns the response from the external site.</p>

python flask python-requests