HTTP Requests using Python

HTTP is a set of protocols designed to enable communication between clients and servers. First and foremost need to install requests package using !pip install requests command in juypter notebook.

Methods :

GET - Used to retrieve information from the server by using URL

POST - Request the server to upload a file

PUT - Generally used to update existing entity

DELETE - Deletes the specified resource in the server

OPTION - Allow the client to determine the options without implying a resource action


In this project to get the information about San Francisco weather using api in to access these information need to import some required packages in juypter notebook. checking the version, copyrights and after get the url checking the status code when we have 200 connection is successful. In this website get case insensitive so here i used pprint.

using json package to print the content in json format and check the website is redirect or not, False printed that means there is no redirection is here.

Working for HCL as a Software Engineer | Information Technology | Interested in Networking | Cloud | Python| Data Analytics