Skip to content
Python implementation of
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
socket_io_emitter Bump version. May 27, 2018
COPYING Add license related files. May 5, 2018 Add license related files. May 5, 2018
requirements.testing.txt Update dependencies for tests. May 4, 2018
setup.cfg More dynamic setup file. May 5, 2018
tox.ini Run tests in different envs. with tox. May 4, 2018


A Python implementation of provides a hook point to easily allow you to emit events to browsers from anywhere so communicates with servers through redis.

We made some changes, compatible 0.2.0 and 0.1.4.

How to use

Install via pip

pip install
from socket_io_emitter import Emitter

io=Emitter({'host': 'localhost', 'port':6379})
io.Emit('broadcast event','Hello from')



The following options are allowed:

  • client: is a redis-py compatible client
    This argument is optional.
  • key: the name of the key to pub/sub events on as prefix (
  • host: host to connect to redis on (localhost)
  • port: port to connect to redis on (6379)

If you don't want to supply a redis client object, and want to initialize one for you, make sure to supply the host and port options.

Specifies a specific room that you want to emit to.


io=Emitter({'host': 'localhost', 'port':6379})
io.In("room-name").Emit("news","Hello from python emitter");


io=Emitter({'host': 'localhost', 'port':6379})

io.To("room-name").Emit("news","Hello from python emitter");

We are flattening the room parameter from [] and *argv, so you can also send to several rooms like this (both examples are valid).

io=Emitter({'host': 'localhost', 'port':6379})

io.To(["room1", "room2"]).Emit("news","Hello from python emitter");
io.To("room1", "room2").Emit("news","Hello from python emitter");


Specifies a specific namespace that you want to emit to.

io=Emitter({'host': 'localhost', 'port':6379})

io.Of("/nsp").In("room-name").Emit("news","Hello from python emitter");

Open Source Projects in Use

@ziλasal & @abdullahselek

You can’t perform that action at this time.