skip to navigation
skip to content

Not Logged In

m2websocket 0.1

Makes websockets with Mongrel2 and Python super easy

Makes handling websockets with Mongrel2 and Python easy.

This module was built for First Opinion.


Typical websocket hello world example, creating an echo server:

from m2websocket import Connection

conn = Connection("tcp://localhost:port", "tcp://localhost:port")

while True:
    req = conn.recv_frame()
    conn.reply_websocket(req, req.body, req.opcode)

Yup, that's all there is to it, much easier than this example.

You can see a working example of the echo server (with a working mongrel2 conf file and python script) by looking in the example/ directory in the Github repo.

Install it

Use Pip:

pip install m2websocket



File Type Py Version Uploaded on Size
m2websocket-0.1.tar.gz (md5) Source 2014-01-16 4KB
  • Downloads (All Versions):
  • 3 downloads in the last day
  • 24 downloads in the last week
  • 161 downloads in the last month