Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 1.18 KB

README.rst

File metadata and controls

41 lines (28 loc) · 1.18 KB

socketIO.client

Here is a barebones socket.io client library for Python.

Thanks to rod for his StackOverflow question and answer, on which this code is based.

Thanks also to liris for his websocket-client and to guille for the socket.io specification.

Installation

# Prepare isolated environment
ENV=$HOME/Projects/env
virtualenv $ENV 
mkdir $ENV/opt

# Activate isolated environment
source $ENV/bin/activate

# Install package
easy_install -U socketIO-client

Usage

ENV=$HOME/Projects/env
source $ENV/bin/activate
python

    from socketIO import SocketIO
    s = SocketIO('localhost', 8000)
    s.emit('news', {'hello': 'world'})

License

This software is available under the MIT License. Please see LICENSE.txt for the full license text.