Skip to main content

Socket.IO client

Project description

Python implementation of the socket.io client.

Design & goals

This implementation is inspired by the JavaScript socket.io-client implementation.

It is directly using python-engineio-client as underlying engine.io layer.

Protocol parser is copied in parts and at least largely inspired from the package python-socketio written by Miguel Grinberg.

This socket.io client is using gevent for now. This is not a strict design choice but a simplification for this first implementaion. Other asynchronous frameworks are welcome for future versions.

Example

from socketio_client.manager import Manager

import gevent
from gevent import monkey;
monkey.patch_socket()

io = Manager('localhost', 8000)
chat = io.socket('/chat')

@chat.on_connect()
def chat_connect():
    chat.emit("Hello")

@chat.on('welcome')
def chat_welcome():
    chat.emit("Thanks!")

io.connect()
gevent.wait()

Project details


Release history Release notifications | RSS feed

This version

1.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fourdrop-socketio-client-1.1.tar.gz (5.9 kB view details)

Uploaded Source

File details

Details for the file fourdrop-socketio-client-1.1.tar.gz.

File metadata

  • Download URL: fourdrop-socketio-client-1.1.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.19.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.15rc1

File hashes

Hashes for fourdrop-socketio-client-1.1.tar.gz
Algorithm Hash digest
SHA256 59131ac0147df172a66a272511cc2a3f8232a9473784cb64d95cfcc1184d4b5d
MD5 a6ee4e8db64ff00cf8a69ff2a8c019fa
BLAKE2b-256 5713d75736b052b912beac12e5987489176a6f80455c6f5f8e5728aa3745a02d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page