Creating a Chat App With Flask-SocketIO (2023)

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 พ.ย. 2024
  • A simple chat application with Flask-SocketIO.
    WORK WITH ME👇🏼
    ✅ Need help with your project? Schedule a call with me at:
    prettyprinted....
    💻 Code written in video
    prettyprinted....

ความคิดเห็น • 60

  • @AlessandroModica
    @AlessandroModica 8 หลายเดือนก่อน

    Very very nice the video and the code. I will use it like a good example for a my game project. Thanks 🤙

  • @tylerpetrov8094
    @tylerpetrov8094 ปีที่แล้ว

    Thanks for the vid! Definitely just what I needed to get up and running!

  • @T3rr4T3rr0r
    @T3rr4T3rr0r 7 หลายเดือนก่อน

    Thanks for clutching my school project

    • @gh0stth3k1d
      @gh0stth3k1d 6 หลายเดือนก่อน

      im working on one too XD

  • @abhishekkandari7116
    @abhishekkandari7116 ปีที่แล้ว

    Thank you for the tutorial.. will try this

  • @annedou7567
    @annedou7567 5 หลายเดือนก่อน

    Thanks for the amazing video

  • @markogrdinic5126
    @markogrdinic5126 7 หลายเดือนก่อน +1

    At 21:57, instead of using the username as the key for the dictionary, it would have been better to swap the two and use the sid instead. Then you wouldn't need to loop over the dictionary and instead could directly index into it using the sid to get the user data.

  • @cloudit4985
    @cloudit4985 ปีที่แล้ว

    This is awesome! Great video

  • @alexzakr
    @alexzakr 11 หลายเดือนก่อน

    It's so cool!

  • @morshedulislamriaad6496
    @morshedulislamriaad6496 9 หลายเดือนก่อน

    ThankYou

  • @WaldoTheWombat
    @WaldoTheWombat 10 หลายเดือนก่อน +1

    Hi Anthony, do you also have a video where you deploy a flask app that uses web sockets? because I just finished deploying my app watching a deployment tutorial by Tech with Tim, but it seems that the sockets don't work there:
    'Cannot obtain socket from WSGI environment.'

    • @prototypebharrat
      @prototypebharrat 8 หลายเดือนก่อน

      Yaa same problem.my app work in development environment but not in deployment

    • @WaldoTheWombat
      @WaldoTheWombat 4 หลายเดือนก่อน

      @@prototypebharrat were you able to solve it?

  • @itwasnoteasy
    @itwasnoteasy 6 หลายเดือนก่อน

    Thanks for making the video. Have you deployed flask-socketio over ssl with wss etc on aws or any other cloud instance in a production like environment?

    • @WaldoTheWombat
      @WaldoTheWombat 4 หลายเดือนก่อน

      hello, were you able to deploy it?

    • @itwasnoteasy
      @itwasnoteasy 4 หลายเดือนก่อน

      Yes, I switched to using flask socketio for my project purposes.

    • @WaldoTheWombat
      @WaldoTheWombat 4 หลายเดือนก่อน

      @@itwasnoteasy what do you mean you switced to flask socket-io? That's flask socket-io is what's shown here

    • @itwasnoteasy
      @itwasnoteasy 4 หลายเดือนก่อน

      @WaldoTheWombat - that’s right I was trying to use flask-sock earlier and switched to flask-socketio. Then I installed gevent or eventlet to start the server. It worked fine over https. I don’t recollect the exact steps but it just worked fine. Part of the problem was to figure the exact command line for gunicorn and gevent/eventlet combination.

    • @WaldoTheWombat
      @WaldoTheWombat 4 หลายเดือนก่อน

      ​@@itwasnoteasy Could you *please* tell me how to do it?? I've watched both Tech With Tim's and Corey Schafer's tutorials on how to deploy Flask apps, but it doesn't work for web sockets.
      I get:
      'Cannot obtain socket from WSGI environment.'
      I have no idea how to solve this and non of these tutorials really explain what how all these server programs work.

  • @LoVe-iu9rd
    @LoVe-iu9rd ปีที่แล้ว

    How about pushing notifications to this message as well rooms sessions, please make a video.

  • @geovannis.a8687
    @geovannis.a8687 ปีที่แล้ว

    Thanks for the Video. Do you know a way to create a multi-chat on the same page? Or do you know a web tool to do that?. Is only a cultural question.. haha

  • @LoVe-iu9rd
    @LoVe-iu9rd ปีที่แล้ว +10

    How did you deployed it to production?

    • @robbedeboosere589
      @robbedeboosere589 ปีที่แล้ว

      does anyone have instructions for this?

    • @GLBCHAT
      @GLBCHAT 4 หลายเดือนก่อน

      @@robbedeboosere589 I struggled with deploying for 3 days , then I could successfully deploy my app to heroku! Should I make a video about it?

    • @WaldoTheWombat
      @WaldoTheWombat 4 หลายเดือนก่อน

      were you able do deploy it?

  • @amanavakn205
    @amanavakn205 ปีที่แล้ว

    I am getting a 400 (Bad Request) error when trying to connect with the postman. Any idea what is going wrong? BTW video is very informative.

  • @cauefernandes5706
    @cauefernandes5706 23 วันที่ผ่านมา

    I downloaded the source code, but it doesn't work anymore.

  • @jenshauser6351
    @jenshauser6351 ปีที่แล้ว

    haven't you allready uploaded that topic a while ago ? 🙂gonna check it :D

    • @prettyprinted
      @prettyprinted  ปีที่แล้ว +3

      Yeah I did about 6 years ago. I wanted to make an updated video.

  • @Franklin096
    @Franklin096 หลายเดือนก่อน

    Python version?

  • @soydara
    @soydara ปีที่แล้ว

    How to do with django rest framework?

    • @prettyprinted
      @prettyprinted  ปีที่แล้ว

      How would you use sockets in an API app?

  • @famisalpedo
    @famisalpedo 9 หลายเดือนก่อน

    how to add videocall

  • @chks_charles
    @chks_charles ปีที่แล้ว +1

    Tell me where i am wrong:
    1) useless setting autoconncet to false, your explonation contradicts the idea of ws. after handshake you can pass this name same way - and even you said it when moved to messages. this is useless in this aplicaion?
    for instance:
    var socket = io();
    socket.on('connect', function() {
    socket.emit('name', {data: 'Donald Duck'});
    });
    whats the point of disabling autoConnection here? btw -code above is right from documentation....
    2) why dont you use rooms? sending message to server to emit it back to other users - why? You connect users give them room, and they emit to the room....
    this contradicts one of advantages of socketIO as layer on websocet - handling many clinets via rooms...
    peace

  • @learnmore5438
    @learnmore5438 ปีที่แล้ว

    does anyone knows how to deploy this on live production server?

    • @prettyprinted
      @prettyprinted  ปีที่แล้ว

      You'll have the easiest time by deploying to your own server instead of using a service. Look into something like Lightsail or Digital Ocean droplets.

    • @learnmore5438
      @learnmore5438 ปีที่แล้ว

      @@prettyprinted thank you, i just deployed it btw.

    • @WaldoTheWombat
      @WaldoTheWombat 10 หลายเดือนก่อน

      @@learnmore5438 can you please tell me ho you did it?
      I just finished deploying my app watching a deployment tutorial by Tech with Tim, but it seems that the sockets don't work there:
      'Cannot obtain socket from WSGI environment.'

    • @WaldoTheWombat
      @WaldoTheWombat 4 หลายเดือนก่อน

      @@learnmore5438 Hi, you can please tell me how you managed to deploy it??I tried 2 different tutorial videos, but I always get problems with the sockets

  • @Kennethlumor
    @Kennethlumor ปีที่แล้ว

    Please I'm pleading you to make a video on how to connect Google Oath to flask login, that will make users registered with the Google account before signing in

  • @en_coded
    @en_coded ปีที่แล้ว

    why is it not realistic to place in one file?

  • @codedjango
    @codedjango ปีที่แล้ว

    With django?

    • @prettyprinted
      @prettyprinted  ปีที่แล้ว +2

      I'll consider making something similar in Django.

    • @codedjango
      @codedjango ปีที่แล้ว

      Thank you 👍

  • @Kennethlumor
    @Kennethlumor ปีที่แล้ว

    Sir please and please I just wanted to remind you again about my request on this

  • @davidk7212
    @davidk7212 ปีที่แล้ว

    Sir, please make version in Hindi