All Projects → ziyasal → Socket.io Python Emitter

ziyasal / Socket.io Python Emitter

Licence: other
Python implementation of socket.io-emitter

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Socket.io Python Emitter

VPSocketIO
socket.io client objective-c
Stars: ✭ 18 (-73.13%)
Mutual labels:  socket-io, socketio
boltly
Boltly: The complete Socket.io test client!
Stars: ✭ 16 (-76.12%)
Mutual labels:  socket-io, socketio
django-channels-with-socket.io
django channels with socket.io
Stars: ✭ 23 (-65.67%)
Mutual labels:  socket-io, socketio
pdfdraw
Nextcloud app to annotate PDF documents
Stars: ✭ 32 (-52.24%)
Mutual labels:  socket-io, socketio
Bizsocket
异步socket,对一些业务场景做了支持
Stars: ✭ 469 (+600%)
Mutual labels:  socketio, socket-io
titanium-socketio
Use the native Socket.io SDK's with Axway Titanium.
Stars: ✭ 25 (-62.69%)
Mutual labels:  socket-io, socketio
bubbly
Full stack chat application created w/ Next.js, Socket.IO, Express, React and TypeScript
Stars: ✭ 24 (-64.18%)
Mutual labels:  socket-io, socketio
Video Chat
Video chat app using Vue, Vuex, WebRTC, SocketIO, Node, Redis & Docker with horizontal scaling. Multiparty and 1 to 1 video functionality, several public rooms and user status
Stars: ✭ 240 (+258.21%)
Mutual labels:  redis, socketio
Go Socket.io
A Socket.IO backend implementation written in Go
Stars: ✭ 409 (+510.45%)
Mutual labels:  socketio, socket-io
Node Tutorial
☺️Some of the node tutorial -《Node学习笔记》
Stars: ✭ 364 (+443.28%)
Mutual labels:  redis, socket-io
socket.io-client-core
High-Performance Socket.IO client in C#
Stars: ✭ 70 (+4.48%)
Mutual labels:  socket-io, socketio
Express Security
nodejs + express security and performance boilerplate.
Stars: ✭ 37 (-44.78%)
Mutual labels:  redis, socket-io
SocketIOSharp
C# implementation of Socket.IO protocol revision 4 client and server.
Stars: ✭ 101 (+50.75%)
Mutual labels:  socket-io, socketio
gobang
五子棋小游戏canvas socket.io
Stars: ✭ 38 (-43.28%)
Mutual labels:  socket-io, socketio
realtime-geolocation
Geolocation tracking app with Node.js, Socket.io, & AngularJS
Stars: ✭ 29 (-56.72%)
Mutual labels:  socket-io, socketio
SocketIOUnity
A Wrapper for socket.io-client-csharp to work with Unity.
Stars: ✭ 69 (+2.99%)
Mutual labels:  socket-io, socketio
Metricio
⚡ Simple framework for easily creating dashboards to display metrics ⚡
Stars: ✭ 142 (+111.94%)
Mutual labels:  redis, socket-io
Nodebb
Node.js based forum software built for the modern web
Stars: ✭ 12,303 (+18262.69%)
Mutual labels:  redis, socket-io
Sockethub
A protocol gateway for the Web.
Stars: ✭ 329 (+391.04%)
Mutual labels:  redis, socket-io
Laravel Event Broadcast
Laravel event broadcasting with Node.js, Redis & Socket.io
Stars: ✭ 5 (-92.54%)
Mutual labels:  redis, socket-io

socket.io-python-emitter

.. image:: https://travis-ci.org/ziyasal/socket.io-python-emitter.svg?branch=master :target: https://travis-ci.org/ziyasal/socket.io-python-emitter

.. image:: https://img.shields.io/pypi/v/socket.io-emitter.svg :target: https://pypi.org/project/socket.io-emitter/

.. image:: https://codecov.io/gh/ziyasal/socket.io-python-emitter/branch/master/graph/badge.svg :target: https://codecov.io/gh/ziyasal/socket.io-python-emitter

A Python implementation of socket.io-emitter <https://github.com/automattic/socket.io-emitter>_.

socket.io <http://socket.io/>_ provides a hook point to easily allow you to emit events to browsers from anywhere so socket.io-python-emitter communicates with socket.io <http://socket.io/>_ servers through redis.

We made some changes, compatible socket.io-redis 0.2.0 and socket.io 0.1.4.

How to use

Install via pip

pip install socket.io-emitter

.. code-block:: python

from socket_io_emitter import Emitter

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

API

Emitter(opts)

The following options are allowed:

  • client: is a redis-py <https://github.com/andymccurdy/redis-py>_ compatible client This argument is optional.
  • key: the name of the key to pub/sub events on as prefix (socket.io)
  • 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 socket.io-python-emitter to initialize one for you, make sure to supply the host and port options.

Specifies a specific room that you want to emit to.

Emitter#In(room):Emitter

.. code-block:: python

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

Emitter#To(room):Emitter

.. code-block:: python

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).

.. code-block:: python

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");

Emitter#Of(namespace):Emitter

Specifies a specific namespace that you want to emit to.

.. code-block:: python

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

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

Open Source Projects in Use

  • redis-py <https://github.com/andymccurdy/redis-py>_ by Andy McCurdy @andymccurdy
  • msgpack-python <https://github.com/msgpack/msgpack-python>_ by MessagePack

@ziλasal & @abdullahselek

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].