Episode 50: Consuming APIs With Python and Building Microservices With gRPC
The Real Python Podcast
Mar 05, 2021 53m
Have you wanted to get your Python code to consume data from web-based APIs? Maybe you’ve dabbled with the requests package, but you don’t know what steps to take next. This week on the show, David Amos is back, and he’s brought another batch of PyCoder’s Weekly articles and projects.
We discuss an article titled, “Python’s APIs: A Winning Combo for Reading Public Data”. David shares another Real Python article about creating microservices using Google Remote Procedure Calls (gRPC).
We also cover several other articles and projects from the Python community including, making a difficult data analysis question easy with pandas, efficiently cleaning text with pandas, the tricky bits of Python concurrency, building rich terminal dashboards, making better assertions for Python tests, and building and managing real-life data science projects with metaflow.
Course Spotlight: Making HTTP Requests With Python
The “requests” library is the de facto standard for making HTTP requests in Python. It abstracts the complexities of making requests behind a beautiful, simple API so that you can focus on interacting with services and consuming data in your application. This course shows you how to work effectively with “requests”, from start to finish.
Topics:
- 00:00:00 – Introduction
- 00:01:46 – Python Microservices With gRPC
- 00:07:49 – Python’s APIs: A Winning Combo for Reading Public Data
- 00:15:07 – Making a Difficult Data Analysis Question Easy With Pandas
- 00:21:07 – Efficiently Cleaning Text With Pandas
- 00:34:20 – Video Course Spotlight
- 00:35:27 – Python Concurrency: The Tricky Bits
- 00:41:49 – Building Rich Terminal Dashboards
- 00:45:08 – python-precisely: Better Assertions for Python Tests
- 00:48:45 – metaflow: Build and Manage Real-Life Data Science Projects With Ease
- 00:52:35 – Thanks and goodbye
Show Links:
Python Microservices With gRPC – Learn how to build a robust and developer-friendly Python microservices infrastructure using gRPC and Kubernetes. You’ll also explore advanced topics such as interceptors and integration testing.
Python’s APIs: A Winning Combo for Reading Public Data – Learn what APIs are and how to consume them using Python. You’ll also learn some core concepts for working with APIs, such as status codes, HTTP methods, using the requests library, and much more.
Making a Difficult Data Analysis Question Easy With Pandas – A great strategy to use when faced with a tricky data analysis problem is to reshape the dataset into a format that turns it into an easy problem. In this article, you’ll look at an example involving a simple calculation and extensive reshaping in pandas.
Efficiently Cleaning Text With Pandas – In this article, you’ll see some examples of cleaning text fields in a large data file and learn several strategies for efficiently cleaning unstructured text fields using Python and pandas.
Python Concurrency: The Tricky Bits – An exploration of threads, processes, and coroutines in Python, with interesting examples that illuminate the differences between each.
Building Rich Terminal Dashboards – Learn how to use the Rich CLI library’s new terminal dashboard feature.
Projects:
- python-precisely: Better Assertions for Python Tests
- metaflow: Build and Manage Real-Life Data Science Projects With Ease
Additional Links:
- API design: Understanding gRPC, OpenAPI and REST and when to use them
- Data Cleaning IS Analysis, Not Grunt Work
- How to Lie with Statistics: Wikipedia Article