Loading video player...
In this hands-on tutorial, we extend a Flet application mounted inside FastAPI to allow the Flet UI to call FastAPI route logic directly as standard Python function calls, without using HTTP. We start from the completed project provided in the free course (Chapter 11: Flet + FastAPI Architecture) and walk through how to: - Download and run the completed starter code - Register FastAPI route functions in a shared Python registry - Expose those functions to the Flet app at runtime - Invoke FastAPI business logic directly from UI event handlers - Compare direct function calls vs HTTP-based integration Along the way, we discuss the tradeoffs of tight coupling, testing implications, performance characteristics, and why HTTP is still the preferred architecture in most real-world applications—even when direct access is possible. This lesson is designed to help you understand why different integration patterns exist, not just how to implement them. What you’ll learn - How Flet and FastAPI can share Python objects - How to build a function registry for FastAPI routes - How to pass registered API functions into a Flet UI - Architectural pros and cons of direct calls vs HTTP - When (and when not) this pattern makes sense Requirements - Python 3.9+ - Basic familiarity with FastAPI and Flet - uv-based Python workflow (used in the demo) Source Code The completed source code used in this video is available in the 100% free course under: Chapter 11 – Flet + FastAPI Architecture → Download completed chapter code Join the free course for more lessons, slides, diagrams, and working projects: https://industry-python.thinkific.com This is a coding-focused lesson with real execution, debugging, and architectural discussion—ideal for students learning full-stack Python or evaluating UI–backend integration strategies.