Websockets from Scratch with Python & JavaScript
In this one, we'll be creating a micro version of Jupyter. That means we'll be using Websockets to call and run Python scripts from the browser using Javascript.
The goal is to introduce you to the concept of websockets while providing you with a deeper look into the amazing tool that is Jupyter.
Software Stack:
Python v3.8
- Asyncio
- websockets
JavaScript
Requirements
- 30 Days of Python
- JavaScript & Try React.js
Code Repo here
Lessons
1
Welcome
0:47
2
Demo
7:57
3
Requirements
1:42
4
Installations
1:54
5
Base Project Setup
3:16
6
Async Functions in Python
11:35
7
Empty Websocket Server
3:43
8
Websocket Client in Python
9:01
9
Sending a Websocket Message from Server to Client and Back
5:08
10
Asyncio Subprocess & Websockets
12:15
11
Promises & Async in JavaScript
15:24
12
Using Parcel.js
5:27
13
Setup React App
6:26
14
React useState
8:56
15
The Basics of Props in React Components
8:06
16
React useEffect
9:59
17
MyWebSocket React Component
8:48
18
Handling WebSocket Open & Close Events
3:49
19
Manually Open & Close WebSocket Connection
5:32
20
Sending Client-side Messages via WebSockets
3:29
21
Handle Textinput for Socket Messages
4:35
22
Handling Server-side Message Responses
6:01
23
Final Adjustments
6:14
24
Thank you & Next Steps
0:51