06- API Layer - Part 2 | CRUD & Sessions | Web Assistant
Kilo Education
0:00 / 0:00
06- API Layer - Part 2 | CRUD & Sessions | Web Assistant
422 просмотра · 3 недели назад
Kilo Education
2,83 тыс. подписчиков
422 просмотра · 3 недели назад
Production-Grade AI Agentic System — CRUD APIs, Rate Limiting & Middleware
In this episode of the *Production-Grade AI Agentic System* series, we continue building the FastAPI API layer by implementing CRUD operations, user session management, rate limiting, chat session endpoints, and request context middleware.
📂 GitHub Repository
https://github.com/Ad7amstein/product...
🚀 What You'll Learn
Understand RESTful *CRUD operations* and when to use:
`POST` for creating resources
`GET` for reading resources
`PATCH` for partial updates
`PUT` for replacing an entire resource
`DELETE` for deleting resources
Work with the *User Sessions* database table and repository.
Implement authentication endpoints for:
`logout`
`logout-all`
`me`
Add *rate limiting* to FastAPI endpoints using `slowapi`.
Configure rate-limiting settings through environment variables and application settings.
Create a centralized rate limiter for the API.
Implement the *Chat Session API* with:
Create chat session
Update chat session
Delete chat session
Get a chat session
Get all chat sessions
Understand the concept of *middleware* in FastAPI.
Learn how *context variables (`contextvars`)* can be used to maintain request-specific context.
Implement and integrate `RequestContextMiddleware`.
Test the request lifecycle through registration, login, and chat session API requests.
Configure SQLAlchemy database debugging with the `DEBUG_DB` setting.
---
⏱️ Chapters
00:00 Introduction
TODO
---
📚 Resources
*Main Source:*
https://medium.com/gitconnected/build...
*Git Commands:*
https://hushed-fear-573.notion.site/G...
---
🔖 Hashtags
#AIAgents #AgenticAI #Python #FastAPI #BackendEngineering #SoftwareArchitecture #ProductionSystems #LLMs #APIDesign #RateLimiting #Middleware #RESTAPI