Abstract: Data scientists use APis in a variety of ways: as data sources for their data pipelines, to gather data for analytics products, and to consume machine learning models. The benefit of APIs is that they’re easy to use. The downside is that they’re also easy to misuse. How can data scientists design their systems to use APIs in a fault-tolerant way that can intelligently react to errors and ensure the validity of data that is provided? How can data scientists use APIs responsibly, without bringing down the API by accident?
In this hands-on workshop, attendees will learn step-by-step the process of consuming a REST API in a Jupyter notebook. They will create fault-tolerant code that validates the output of APIs and handles errors intelligently. They will learn advanced techniques such as progressive backoff to avoid breaking the system they’re trying to call. Then they will learn how to make that code reusable by creating a software development kit (SDK) for the API.
Session Outline:
Introduction to APIs and data science - examples of using APIs in data science
Validating API output and handling errors - Jupyter notebooks and Pydantic
Creating fault-tolerance and responsible API usage - httpx
Packaging your code to make it reusable
Background Knowledge:
Background knowledge of Python.
General understanding of REST APIs.
Bio: Ryan Day is an advanced data scientist at the Conference of State Bank Supervisors (CSBS), a non-profit association in the financial services industry. He is an AWS-certified solutions architect and a member of the National Association of Business Economics. He is an experienced open-source developer who participates in the FastAPI project.
Ryan is currently writing a book titled Hands-On APIs for AI and Data Science that demonstrates the value of hands-on side projects. It will be published in April 2025 by O’Reilly Publishing.

Ryan Day
Title
Advanced Data Scientist | Conference of State Bank Supervisors


