Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consuming A Web Service with Python Consuming data from programmable web based API's is growing rapidly. According to ProgrammableWeb, in just six years (2010-2016), web

Consuming A Web Service with Python

Consuming data from programmable web based API's is growing rapidly. According to ProgrammableWeb, in just six years (2010-2016), web API counts increased 758 percent with the majority being REST based. This is driven by a myriad of factors but growth of cloud based applications, (distributed computing by another name), and the resulting need to integrate the different categories is a major factor.

Description

Compose a client to consume a REST web service of you choice using Python. There are many listings of such services but an excellent resource is ProgrammableWeb (https://www.programmableweb.com/). Your information should produce useful information. I.e. a dump of cryptic data is not the desired product. Examples could be a weather forecast, stock quote, Bible verse, etc.,

Your solution should present the user with a question with the answer contributing to the data used in the REST web service call. For example, a weather forecast would prompt the user to enter a zip code or other location information. Once the web transaction is complete, the program should prompt again with the same question to finish another transaction. This should continue until the user enters a specified termination condition.

You output must be presented in an understandable manner. Dumps of XML, JSON, etc., are substandard and will be graded accordingly.

Hint:

Another site with a simple REST API can be found here: http://labs.bible.org/api_web_service Be sure to click on the examples and look at the address bar of your browser. That is what you will need to generate with the Python requests module.

You are free to use any REST web service you find but I recommend this one if you are looking for something straightforward. One word of caution, some services require you to request access via an API key. The approval may not be immediate so you will want to find something sooner rather than later. The example I listed above requires no approval.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions