{"id":13502261,"url":"https://github.com/bugthesystem/socket.io-python-emitter","last_synced_at":"2026-02-23T10:32:24.647Z","repository":{"id":17543299,"uuid":"20346042","full_name":"bugthesystem/socket.io-python-emitter","owner":"bugthesystem","description":"Python implementation of socket.io-emitter that provides a hook point to easily allow you to emit events to browsers from anywhere :rocket:","archived":false,"fork":false,"pushed_at":"2018-07-13T13:09:09.000Z","size":47,"stargazers_count":75,"open_issues_count":2,"forks_count":22,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-11T02:08:43.605Z","etag":null,"topics":["pip","python","redis","socket-io","socketio"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bugthesystem.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-31T00:24:48.000Z","updated_at":"2025-02-02T09:54:11.000Z","dependencies_parsed_at":"2022-09-10T14:41:41.552Z","dependency_job_id":null,"html_url":"https://github.com/bugthesystem/socket.io-python-emitter","commit_stats":null,"previous_names":["bugthesystem/socket.io-python-emitter","ziyasal/socket.io-python-emitter"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugthesystem%2Fsocket.io-python-emitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugthesystem%2Fsocket.io-python-emitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugthesystem%2Fsocket.io-python-emitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugthesystem%2Fsocket.io-python-emitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bugthesystem","download_url":"https://codeload.github.com/bugthesystem/socket.io-python-emitter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244489187,"owners_count":20460950,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pip","python","redis","socket-io","socketio"],"created_at":"2024-07-31T22:02:07.960Z","updated_at":"2026-02-23T10:32:19.614Z","avatar_url":"https://github.com/bugthesystem.png","language":"Python","readme":"socket.io-python-emitter\n========================\n\n.. image:: https://travis-ci.org/ziyasal/socket.io-python-emitter.svg?branch=master\n    :target: https://travis-ci.org/ziyasal/socket.io-python-emitter\n\n.. image:: https://img.shields.io/pypi/v/socket.io-emitter.svg\n    :target: https://pypi.org/project/socket.io-emitter/\n\n.. image:: https://codecov.io/gh/ziyasal/socket.io-python-emitter/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/ziyasal/socket.io-python-emitter\n\nA Python implementation of `socket.io-emitter \u003chttps://github.com/automattic/socket.io-emitter\u003e`_.\n\n`socket.io \u003chttp://socket.io/\u003e`_ provides a hook point to easily allow you to emit events to browsers from anywhere so `socket.io-python-emitter` communicates with `socket.io \u003chttp://socket.io/\u003e`_ servers through redis.\n\nWe made some changes, compatible socket.io-redis 0.2.0 and socket.io 0.1.4.\n\nHow to use\n----------\n\n**Install via pip**\n  \n  pip install socket.io-emitter\n\n.. code-block:: python\n\n  from socket_io_emitter import Emitter\n\n  io=Emitter({'host': 'localhost', 'port':6379})\n  io.Emit('broadcast event','Hello from socket.io-python-emitter')\n\nAPI\n---\n\nEmitter(opts)\n-------------\n\nThe following options are allowed:\n\n- `client`: is a `redis-py \u003chttps://github.com/andymccurdy/redis-py\u003e`_ compatible client\n   This argument is optional.\n- `key`: the name of the key to pub/sub events on as prefix (`socket.io`)\n- `host`: host to connect to redis on (`localhost`)\n- `port`: port to connect to redis on (`6379`)\n\nIf you don't want to supply a redis client object, and want\n`socket.io-python-emitter` to initialize one for you, make sure to supply the\n`host` and `port` options.\n\nSpecifies a specific `room` that you want to emit to.\n\nEmitter#In(room):Emitter\n------------------------\n\n.. code-block:: python\n\n  io=Emitter({'host': 'localhost', 'port':6379})\n  io.In(\"room-name\").Emit(\"news\",\"Hello from python emitter\");\n\nEmitter#To(room):Emitter\n------------------------\n\n.. code-block:: python\n\n  io=Emitter({'host': 'localhost', 'port':6379})\n    \n  io.To(\"room-name\").Emit(\"news\",\"Hello from python emitter\");\n\nWe are flattening the room parameter from `[]` and `*argv`, so you can also send to several rooms like this (both examples are valid).\n\n.. code-block:: python\n\n  io=Emitter({'host': 'localhost', 'port':6379})\n\n  io.To([\"room1\", \"room2\"]).Emit(\"news\",\"Hello from python emitter\");\n  io.To(\"room1\", \"room2\").Emit(\"news\",\"Hello from python emitter\");\n\nEmitter#Of(namespace):Emitter\n-----------------------------\n\nSpecifies a specific namespace that you want to emit to.\n\n.. code-block:: python\n\n  io=Emitter({'host': 'localhost', 'port':6379})\n    \n  io.Of(\"/nsp\").In(\"room-name\").Emit(\"news\",\"Hello from python emitter\");\n\nOpen Source Projects in Use\n---------------------------\n\n* `redis-py \u003chttps://github.com/andymccurdy/redis-py\u003e`_ by Andy McCurdy @andymccurdy\n* `msgpack-python \u003chttps://github.com/msgpack/msgpack-python\u003e`_ by MessagePack\n\n@ziλasal \u0026 @abdullahselek\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugthesystem%2Fsocket.io-python-emitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugthesystem%2Fsocket.io-python-emitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugthesystem%2Fsocket.io-python-emitter/lists"}