<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Structure, Dependencies, and Middleware on DATATWEETS</title><link>https://datatweets.com/courses/fastapi/dependencies-and-structure/</link><description>Recent content in Structure, Dependencies, and Middleware on DATATWEETS</description><generator>Hugo</generator><language>en</language><copyright>Copyright (c) 2025 Datatweets</copyright><lastBuildDate>Sun, 28 Jun 2026 09:00:00 +0200</lastBuildDate><atom:link href="https://datatweets.com/courses/fastapi/dependencies-and-structure/index.xml" rel="self" type="application/rss+xml"/><item><title>Lesson 1 - Dependency Injection</title><link>https://datatweets.com/courses/fastapi/dependencies-and-structure/lesson-1-dependency-injection/</link><pubDate>Fri, 14 Nov 2025 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/fastapi/dependencies-and-structure/lesson-1-dependency-injection/</guid><description>Dependency injection is FastAPI&amp;rsquo;s way to reuse logic — pagination, auth, a database session — across endpoints. Write a dependency function, declare it with Depends, and let FastAPI run it and pass the result into your endpoint.</description></item><item><title>Lesson 2 - Reusable and Sub-Dependencies</title><link>https://datatweets.com/courses/fastapi/dependencies-and-structure/lesson-2-reusable-and-sub-dependencies/</link><pubDate>Fri, 14 Nov 2025 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/fastapi/dependencies-and-structure/lesson-2-reusable-and-sub-dependencies/</guid><description>Three powerful dependency patterns: class dependencies that give you a typed object, sub-dependencies that chain together (like current-user on top of an api-key check), and yield dependencies that set up and tear down resources such as a database session.</description></item><item><title>Lesson 3 - Bigger Applications with Routers</title><link>https://datatweets.com/courses/fastapi/dependencies-and-structure/lesson-3-bigger-applications-with-routers/</link><pubDate>Fri, 14 Nov 2025 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/fastapi/dependencies-and-structure/lesson-3-bigger-applications-with-routers/</guid><description>One giant main.py doesn&amp;rsquo;t scale. Use APIRouter to move related routes into their own modules, give each a prefix and tags, and assemble them with include_router — the standard way to structure a real FastAPI project.</description></item><item><title>Lesson 4 - Middleware and CORS</title><link>https://datatweets.com/courses/fastapi/dependencies-and-structure/lesson-4-middleware-and-cors/</link><pubDate>Fri, 14 Nov 2025 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/fastapi/dependencies-and-structure/lesson-4-middleware-and-cors/</guid><description>Middleware wraps every request and response, perfect for cross-cutting concerns like timing, logging, and custom headers. Learn to write your own, then enable CORS so browser frontends on other origins can call your API safely.</description></item><item><title>Lesson 5 - Guided Project: Modular App</title><link>https://datatweets.com/courses/fastapi/dependencies-and-structure/lesson-5-guided-project-modular-app/</link><pubDate>Fri, 14 Nov 2025 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/fastapi/dependencies-and-structure/lesson-5-guided-project-modular-app/</guid><description>The fourth version of the course project: restructure the Tasks API the professional way. Split routes into an APIRouter, share logic with a dependency, add middleware and CORS, and assemble it all in a tidy project layout.</description></item></channel></rss>