socket.io-redis-emitter


Namesocket.io-redis-emitter JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/roma-glushko/socket.io-redis-emitter
SummaryAn asynchronous Redis-based Socket.IO emitter for Python
upload_time2024-06-09 09:25:37
maintainerNone
docs_urlNone
authorRoman Glushko
requires_python<4.0,>=3.8
licenseMIT
keywords socket.io redis websocket emitter library
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Socket.IO Redis Emitter

This is an asynchronous Redis-based [Socket.IO emitter](https://socket.io/docs/v4/emitting-events/) for Python.

## Installation

```bash
pip install socket.io-redis-emitter
# or
poetry add socket.io-redis-emitter
```

## Features

- High quality, typed and modern Python codebase
- Clean, concise and Pythonic API
- Uses [redis](https://redis.readthedocs.io/en/latest/) as a Redis client
- Supports namespaces, rooms and regular Socket.IO message emitting

```python
import redis
from socketio_emitter import Emitter

client = redis.Redis(...)
emitter = Emitter(client=client)

async with emitter.namespace("/nsp") as nsp:
    async with nsp.rooms("room1", "room2") as clients:
        await clients.emit("machineStatus", {"status": "ok"})
```

- Remote requests to join, leave rooms or to disconnect

```python
import redis
from socketio_emitter import Emitter

client = redis.Redis(...)
emitter = Emitter(client=client)

async with emitter.namespace("/nsp") as nsp:
    async with nsp.rooms("room1", "room2") as clients:
        await clients.join("room3")
        # await clients.leave("room3")
        # await clients.disconnect()
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/roma-glushko/socket.io-redis-emitter",
    "name": "socket.io-redis-emitter",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": "socket.io, redis, websocket, emitter, library",
    "author": "Roman Glushko",
    "author_email": "roman.glushko.m@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/6f/a0/0ae2bd74113ff4a740a4d3c3024b08661caa016d7657091d588cd00ff67a/socket_io_redis_emitter-0.0.3.tar.gz",
    "platform": null,
    "description": "# Socket.IO Redis Emitter\n\nThis is an asynchronous Redis-based [Socket.IO emitter](https://socket.io/docs/v4/emitting-events/) for Python.\n\n## Installation\n\n```bash\npip install socket.io-redis-emitter\n# or\npoetry add socket.io-redis-emitter\n```\n\n## Features\n\n- High quality, typed and modern Python codebase\n- Clean, concise and Pythonic API\n- Uses [redis](https://redis.readthedocs.io/en/latest/) as a Redis client\n- Supports namespaces, rooms and regular Socket.IO message emitting\n\n```python\nimport redis\nfrom socketio_emitter import Emitter\n\nclient = redis.Redis(...)\nemitter = Emitter(client=client)\n\nasync with emitter.namespace(\"/nsp\") as nsp:\n    async with nsp.rooms(\"room1\", \"room2\") as clients:\n        await clients.emit(\"machineStatus\", {\"status\": \"ok\"})\n```\n\n- Remote requests to join, leave rooms or to disconnect\n\n```python\nimport redis\nfrom socketio_emitter import Emitter\n\nclient = redis.Redis(...)\nemitter = Emitter(client=client)\n\nasync with emitter.namespace(\"/nsp\") as nsp:\n    async with nsp.rooms(\"room1\", \"room2\") as clients:\n        await clients.join(\"room3\")\n        # await clients.leave(\"room3\")\n        # await clients.disconnect()\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An asynchronous Redis-based Socket.IO emitter for Python",
    "version": "0.0.3",
    "project_urls": {
        "Homepage": "https://github.com/roma-glushko/socket.io-redis-emitter",
        "Repository": "https://github.com/roma-glushko/socket.io-redis-emitter"
    },
    "split_keywords": [
        "socket.io",
        " redis",
        " websocket",
        " emitter",
        " library"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3200229afcce321ef47dcc78c61a3264d0819ddc8e1f1762f5937b50ab66504d",
                "md5": "bdd27848a0ec65883712c3e0a340472e",
                "sha256": "084f9d49d3867cd06ef4c8bfbc102d3c7f5093fb98f60e73a080d3722f6f4331"
            },
            "downloads": -1,
            "filename": "socket_io_redis_emitter-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bdd27848a0ec65883712c3e0a340472e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 5573,
            "upload_time": "2024-06-09T09:25:36",
            "upload_time_iso_8601": "2024-06-09T09:25:36.591924Z",
            "url": "https://files.pythonhosted.org/packages/32/00/229afcce321ef47dcc78c61a3264d0819ddc8e1f1762f5937b50ab66504d/socket_io_redis_emitter-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6fa00ae2bd74113ff4a740a4d3c3024b08661caa016d7657091d588cd00ff67a",
                "md5": "d61a5fba590e2ab39b17348c9031a9cd",
                "sha256": "a18d0f089d9aadcea5b7befca60624419940589e3e8478987e701e610028b1f0"
            },
            "downloads": -1,
            "filename": "socket_io_redis_emitter-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "d61a5fba590e2ab39b17348c9031a9cd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 4255,
            "upload_time": "2024-06-09T09:25:37",
            "upload_time_iso_8601": "2024-06-09T09:25:37.889444Z",
            "url": "https://files.pythonhosted.org/packages/6f/a0/0ae2bd74113ff4a740a4d3c3024b08661caa016d7657091d588cd00ff67a/socket_io_redis_emitter-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-09 09:25:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "roma-glushko",
    "github_project": "socket.io-redis-emitter",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "socket.io-redis-emitter"
}
        
Elapsed time: 0.24577s