From the course: Scripting for Testers

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

REST API calls from Python

REST API calls from Python - Python Tutorial

From the course: Scripting for Testers

Start my 1-month free trial

REST API calls from Python

- [Teacher] The idea of an API can be intimidating but the reality is getting started with it in Python is actually quite easy. But before we do that let's take a moment to quickly overview what it means to have a REST API. Basically it's just a way to interact with a site by telling it what to do. You specify a URL to indicate the things you want to use and then you can ask it to do one of four things. If the object does not exist you can tell it to POST to create the object. Or if the object already exists you can do a PUT to modify the object. If the object already exists you can also do a DELETE which would remove the existing object and if the object exists you could do a GET some information about an object. But let's see this in action, well switch over to the command console and let's install a module that will help us work with REST APIs in Python. We can do this with pip in Python very easily. We'll just call pip install and we'll install this module which is the request…

Contents