Loading video player…

Working With APIs in Python: Reading Public Data (Overview)

Python is an excellent choice for working with Application Programming Interfaces (APIs), allowing you to efficiently consume and interact with them. By using the Requests library, you can easily fetch data from APIs that communicate using HTTP, such as REST, SOAP, or GraphQL APIs. This video course covers the essentials of consuming REST APIs with Python, including authentication and handling responses.

By the end of this video course, you’ll understand that:

  • An API is an interface that allows different systems to communicate, typically through requests and responses.
  • Python is a versatile language for consuming APIs, offering libraries like Requests to simplify the process.
  • REST and GraphQL are two common types of APIs, with REST being more widely used for public APIs.
  • To handle API authentication in Python, you can use API keys or more complex methods like OAuth to access protected resources.

Knowing how to consume an API is one of those magical skills that, once mastered, will crack open a whole new world of possibilities, and consuming APIs using Python is a great way to learn such a skill.

By the end of this video course, you’ll be able to use Python to consume most of the APIs that you come across. If you’re a developer, then knowing how to consume APIs with Python will empower you to integrate data from various online sources into your applications.

Download

Course Slides (.pdf)

1.6 MB
Download

Sample Code (.zip)

3.6 KB

00:00 Welcome to Accessing Public APIs With Python. Did you know it’s possible to use data and features from your favorite websites and apps in your Python projects? You can do so using the power of APIs.

00:15 In this beginner course, I will show you how to interact with APIs and use them in your own projects. But if you’ve never used them before, you might wonder, what is an API?

00:25 API is short for Application Programming Interface. It is a way of interacting with a service like GitHub, Spotify, or Stripe through code. This means you can add awesome features from these services and others to your applications.

00:39 You interact with almost all APIs in the same way. You send a request for some data and the API returns a response with what you requested. In this course, you will learn how to send a request and read a response, how to use query parameters to ask for specific data, how to use authentication to prove your identity, and how to be wary of how much demand you are placing on the server. This course will focus on one API in particular, the GitHub API.

01:11 Along the way, you will work on several small projects, including viewing all the available emojis on GitHub, filtering through Microsoft’s repositories using query parameters, and using authentication to access your own user data.

01:25 Although you will only be using the GitHub API, the code and techniques you use will be very similar when you start working with other APIs. If you’re super excited to get started, you may wonder how to go about interacting with an API.

01:40 In the next lesson, you will make your first API call by installing and using the requests library.

Become a Member to join the conversation.