Python Live Chat Room Tutorial Using Flask & SocketIO

preview_player
Показать описание
Today, I will be showing you guys how to make a live chat application using Python, Flask & SocketIO! Please keep in mind, this tutorial is not for complete beginners, I recommend having some Python experience.

⭐️ Timestamps ⭐️

00:00 | Introduction and Demo
02:03 | Setup/Installation
03:44 | Flask Initialization
09:09 | HTML Templates
15:48 | Home Page - Create/Join Room
24:27 | POST Request, Form Data, Sessions
40:51 | Chat Room
49:40 | Flask - Socket Connecting
56:22 | Flask - Socket Disconnecting
00:00 | JavaScript - Socket Connection
01:06:55 | Sending Messages
01:13:58 | Finishing Touches

◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️

◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️

⭐️ Tags ⭐️
- Tech With Tim
- Live Chat Room Tutorial
- Python

⭐️ Hashtags ⭐️
#techwithtim #Chatroom #pythontutorial
Рекомендации по теме
Комментарии
Автор

I'm a new subscriber, just subscribed a few days ago, and now I'm a fan of Tim.
Tim really appreciate your work 🙇

omanand
Автор

God sent you. I am making a chat room right now!!!

hjtomi_
Автор

These python tutorials are the best tech homie tim

bigloud
Автор

Very very thank you sir.. You just nailed it.. thank you soo much.. Had I not been in school, I would have definitely gifted you a super thanks.. thanks again sir.. !!

sauhardyahaldar
Автор

@TechWithTim Thank you Tim! You have helped me understand a lot of things, appreciate your work!

booppdibap
Автор

been subscribed to u for a while...






never had reason to regret it, keep up the great work bro 👌👌🥳🥳

enderboy
Автор

Such a great tutorial. I love how you show your thinking process and protect the server from potential error conditions.

Can I suggest a more in depth tutorial on the nuances of websockets, such as broadcast, heartbeats, emit vs. send?

joeg
Автор

I learned so much in this video thanks a lot Tim!

joey-typing
Автор

It's fun to note this room/user socket system ca be used in many different ways. Making a chat room just highlights the process well. Imagine if each "user" was some API or process. Easy to send data that way

Neceros
Автор

If you're wondering why Tim does *if create != False:* instead of just *if create*, it's because when a button is clicked, that button's name is added as the key and the value is an empty string.
An empty string ("") is not equal to the *False* object in python and so the statement *create != False* becomes *True* an that's how we know the button was pressed. An empty string does evaluate to False however, so *if create* would have been *False* .

so I guess we could have also done *create == ""* ?

WaldoTheWombat
Автор

Thanks, Tim, really enjoyed this video, and also learn sth new as well.

Ruzzikwow
Автор

Really appreciated Man! Need more python projects videos✌🙌

timjames
Автор

it was great and informative thanks for this ! TIM

Shivforall
Автор

wow, it is great, many thanks all to you

msap
Автор

This is pretty awesome. would have liked to see this implemented with a database, maybe sqlite or mongoose.

matthewparsons
Автор

Hi Tim. Do you think you can make a simple program that highlight a paint splat shape on mouse hover inside its boundary?

azamd
Автор

Thank you for wonderful tutorial ...

Sir please provide tutorial on "sanic framework" and gitlab and project too ...

abhishekkeshari
Автор

I'm waiting for flask videos 🌹😭❤️😀👍🔥

passionforsciencel
Автор

Thank you for the tutorial! I followed your instructions and was able to build a chatroom and works fine locally. However, I’m having trouble deploying it on Heroku. The site itself comes up, but I can’t find the room or send messages. Do you know how to fix this issue? [Procfile (web: gunicorn main:app) and dynos is ON]. Any help would be greatly appreciated. Thank you!

alijafarbeglou
Автор

1:14:50
Pay attention guys:
This *messages* variable is the one sent from the server, not to be confused with the other messages variable defined in *room.HTML* at the other script tag, which receives the HTML element with the id *"messages"* as its value!

WaldoTheWombat