Kateryna Budzyak
Kat is a Senior Machine Learning Engineer at Malt, the freelancer marketplace, where she works in the relevancy and matching team. She has a background in bioinformatics and passionate about beautiful code.
Session
Develop FastAPI applications faster with the contract-first approach using the OpenAPI Generator, no GenAI required.
To attend this workshop, please install the openapi generator.
For details, please visit the README.md of https://gitlab.com/Eeffee/pycon26
Machine learning models are often deployed as APIs, but the "agreement" between the consumer and the service is often fragile. How does the consuming app know if a parameter is optional or required? When the code diverges from the documentation, integration breaks.
In this tutorial you will learn to define an API contract using OpenAPI specification. We will use the OpenAPI Generator to automatically generate API endpoints and strictly typed Pydantic data models. Following this approach for all applications supports standardization, consistency, and maintainability across all projects.
The session will cover three key areas:
Design: We will define an OpenAPI specification as our single source of truth for the API and end consumer.
Generate: We will use the OpenAPI Generator to create a FastAPI skeleton and show possibilities for customization to fit specific project needs.
Implement: We will connect our generated app to a ML model where we will create Mystic Creatures for Real Life Problems