is "from flask import request" identical to "import requests"? is "from flask import request" identical to "import requests"? flask flask

is "from flask import request" identical to "import requests"?


No these are not only completely different libraries, but completely different purposes.

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

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