Course overview
This course helps you understand how WebSockets work in FastAPI and when to use them instead of HTTP. You will implement connections, text and JSON messaging, disconnect handling, rooms, private messages, and broadcasting. By the end, you will build a chat mini-project with token validation and pass automated tests in UPSHELL.
You will learn
Create WebSocket connections in FastAPI
Implement chat rooms and private messaging
Handle errors, disconnects, and close codes
Validate tokens and JSON message structure
Table of contents
What Are WebSockets
Practice
18 min.
First WebSocket Connection
Practice
16 min.
Sending and Receiving Messages
Practice
15 min.
Echo Server in FastAPI
Practice
17 min.
Handling Client Disconnect
Practice
17 min.
Validating Message Data
Practice
17 min.
Active Connections List
Practice
39 min.
Private Messages to Client
Practice
19 min.
Broadcast to All Clients
Practice
37 min.
Chat Room
Practice
35 min.
Usernames in Chat
Practice
18 min.
Recent Message History
Practice
43 min.
Join and Leave Events
Practice
43 min.
JSON Messages in WebSockets
Practice
40 min.
Event Types in Messages
Practice
41 min.
Protocol Error Handling
Practice
50 min.
Ping and Connection Keepalive
Practice
19 min.
Message Rate Limiting
Practice
40 min.
Closing with Status Code
Practice
17 min.
Connecting via HTML Client
Practice
18 min.
Chat with Multiple Rooms
Practice
40 min.
Token Check on Connection
Practice
17 min.
Frequently Asked Questions
A subscription to the platform gives you unlimited access to all courses, as well as access to an online trainer with practical exercises.
Additionally, with a Premium subscription or higher, you also get access to all pet projects and the opportunity to take technical interviews with an AI mentor.
You can cancel your subscription at any time, and you will still have access to the platform for the paid period. You can do this through your personal account in the 'Subscription Management' section.
Yes, you can upgrade to a new plan at any time. We will provide a discount based on the unused time of your current plan. You can change your plan in your personal account.
To request a refund for a paid plan, please contact us at support@upshell.io. We will process your refund for the unused portion of your subscription within 5 business days.