Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6610279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:49:14+00:00 2026-05-25T19:49:14+00:00

Can anyone recommend a Socket.IO client library for Python? I’ve had a look around,

  • 0

Can anyone recommend a Socket.IO client library for Python?
I’ve had a look around, but the only ones I can find are either server implementations, or depend on a framework such as Twisted.

I need a client library that has no dependencies on other frameworks.

Simply using one of the many connection types isn’t sufficient, as the python client will need to work with multiple socketio servers, many of which won’t support websockets, for example.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T19:49:15+00:00Added an answer on May 25, 2026 at 7:49 pm

    Archie1986’s answer was good but has become outdated with socketio updates (more specifically, its protocol : https://github.com/LearnBoost/socket.io-spec)… as far as i can tell, you need to perform the handshake manually before you can ask for a transport (e.g., websockets) connection… note that the code below is incomplete and insecure… for one, it ignores the list of supported transports returned in the handshake response and always tries to get a websocket… also it assumes that the handshake always succeeds… nevertheless, it’s a good place to start

    import websocket, httplib
    
    ...
    
    '''
        connect to the socketio server
    
        1. perform the HTTP handshake
        2. open a websocket connection '''
    def connect(self) :
        conn  = httplib.HTTPConnection('localhost:8124')
        conn.request('POST','/socket.io/1/')
        resp  = conn.getresponse() 
        hskey = resp.read().split(':')[0]
    
        self._ws = websocket.WebSocket(
                        'ws://localhost:8124/socket.io/1/websocket/'+hskey,
                        onopen   = self._onopen,
                        onmessage = self._onmessage)
    
    ....
    

    you might also want to read up on python-websockets: https://github.com/mtah/python-websocket

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone recommend an xml rpc library or client for wordpress using java? I've
Can anyone recommend a good compact Python graphics library (with tutorials) which is suitable
Can anyone recommend a good library for generating an audio file, such as mp3,
Can anyone recommend software or a .NET library that will check for bounced emails
Can anyone recommend a library for chart generation (bar charts, pie charts etc.) which
Can anyone recommend an open source Ruby library for adding XMP metadata to JPEG
Can anyone recommend a lightweight, fast, and hopefully stable B-tree (or similar) library for
Can anyone recommend a good library I could use on Linux to watermark videos?
Can anyone recommend me some good tutorial regarding SOM? I googled up some, but
Can anyone recommend a wiki engine with great support for implementing client-side javascript or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.