{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Framework :: AsyncIO" ], "description": "AIOHttp WebSockets Server\n-------------------------\n\nEasy and ready to use websocket server based on AIOHTTP framework. This tool allows you\nto easily build application based on websockets in a short time.\n\nRequirements\n------------\n\n - Python 3.6+\n\nAIOWS Does not requires anything else. It's a really simple and lightweight application\nwhich can give you ability to communicate your server with the clients in a real-time.\n\nAIOWS Supports three types of packages:\n\n - JSON\n - Text\n - Bytes\n \nThis allows you to build whatever you want. For example - video chat, multiplayer game,\nchat, notifications...\n\nInstallation\n------------\n\n pip install aiows\n \nAfter installation - you can start to develop your application. Example of the front-end\nsockets usage you can see at **demo/simple-socket.js**.\n\nUsage\n-----\n\n**Basic understanding**\n\nAIOWS Does not supports WebSockets bidirectional communication. It means that you'll not\nbe able to send packets to the server via sockets. It's done for security and stability\nreasons. Instead of bidirectional communication, AIOWS has HTTP API which allows you to\nshare packages between WS Subscribers.\n\nHTTP API Is open from global network, so for security reasons you can setup publish password\nwhich will filter any unauthorized requests.\n\n**AIOWS**\n\n $ aiows --help\n usage: aiows [-h] [--pwd PWD] [--usock USOCK] [--host HOST] [--port PORT]\n [--reuse-addr REUSE_ADDR] [--reuse-port REUSE_PORT]\n [--url-prefix URL_PREFIX]\n \n AIOHttp WebSocket server\n \n optional arguments:\n -h, --help show this help message and exit\n --pwd PWD Password to be able to publish messages.\n --usock USOCK UNIX Socket file for aiows server\n --host HOST Server host\n --port PORT Server port\n --reuse-addr REUSE_ADDR\n Reuse host\n --reuse-port REUSE_PORT\n Reuse port\n --url-prefix URL_PREFIX\n API Endpoints prefix\n\n\nHTTP API Endpoints\n---------\n\n**/channel/{channel_name}/**\n\nThis is WebSocket endpoint. Allows to subscribe to channel updates. \n\n\n**POST /channel/{channel_name}/**\n\nAllows to share package to channel.\n\n Request Headers:\n - Package-Type(Text/bytes/json) - which type of package will be sent.\n \n Query Params:\n - pwd(str) - publishing password (by default: None)\n \n Request body:\n - any - publishing message\n \n Responses:\n - 403 - Wrong password\n - 400 - Failed to read request body\n - 201 - Published\n\n\nExample\n\n import requests\n \n requests.post(\n url='http://127.0.0.1/channel/test-channel/?pwd=some-secure-pwd', \n headers={'package-type': 'text'}, \n data='Hello world'\n )\n \n**POST /broadcast/**\n\nAllows to bulk share packages between many channels.\n\n Query Params:\n - pwd(str) - publishing password (by default: None)\n \n Request body:\n - json(str) - publishing channels and messages as key=>value. Example:\n \n {\n \"room:1\": [{\"text\": \"Hi all\"}],\n \"user:22\": [{\"json\": {\"notification\": \"You've got new friend\"}}],\n \"video:stream\": [{\"bytes\": \"\\x031\\x032\\x033...\"}, {\"bytes\": \"\\x031\\x032\\x033...\"}]\n }\n \n Responses:\n - 403 - Wrong password\n - 400 - Failed to read request body\n - 201 - Published\n\nExample\n\n import requests\n \n requests.post(\n url='http://127.0.0.1/broadcast/?pwd=some-secure-pwd', \n json={\n \"test-channel\": [\n {\"text\": \"Hello world\"}\n ],\n \"call:stream-channel\": [\n {\"bytes\": \"\\x031\\x032\\x033...\"}, \n {\"bytes\": \"\\x031\\x032\\x033...\"},\n {\"bytes\": \"\\x031\\x032\\x033...\"},\n {\"bytes\": \"\\x031\\x032\\x033...\"},\n {\"bytes\": \"\\x031\\x032\\x033...\"},\n {\"bytes\": \"\\x031\\x032\\x033...\"}\n ]\n }\n )", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/duverse/aiows", "keywords": "", "license": "General Public License v3.0", "maintainer": "", "maintainer_email": "", "name": "aiows", "package_url": "https://pypi.org/project/aiows/", "platform": "", "project_url": "https://pypi.org/project/aiows/", "project_urls": { "Homepage": "https://github.com/duverse/aiows" }, "release_url": "https://pypi.org/project/aiows/0.1/", "requires_dist": null, "requires_python": "", "summary": "Easy to use aiohttp websockets application.", "version": "0.1" }, "last_serial": 4357169, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "a5d97f6569dc7db9ff48f996ce20e49a", "sha256": "4fdc3f6d920d6aaaa3bb84c14479a9f2c29cda27931ea141278a0557806be539" }, "downloads": -1, "filename": "aiows-0.1.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "a5d97f6569dc7db9ff48f996ce20e49a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10758, "upload_time": "2018-10-09T19:00:55", "url": "https://files.pythonhosted.org/packages/ac/0d/e77f88af8f94b30efcfc3f15ede6c5970503dfb91a7057b44e99fad07091/aiows-0.1.linux-x86_64.tar.gz" } ], "0.1a0": [ { "comment_text": "", "digests": { "md5": "8bb73b4b8e07689e0071cf5e96a1d06b", "sha256": "702b15e9d449603d090dfbc3a414caa5b2f6f23fdb085fa4d422147d2646e4e1" }, "downloads": -1, "filename": "aiows-0.1a0.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "8bb73b4b8e07689e0071cf5e96a1d06b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10397, "upload_time": "2018-10-09T09:15:39", "url": "https://files.pythonhosted.org/packages/48/fc/9140f889e6574d8fdcda7ae651996259036fd6baa1ba510d1e5d32887d45/aiows-0.1a0.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "dd66cbf1790c3bd170b09949512eae26", "sha256": "bd93de70dd22b25295bd5d76758b1ad1505f48c3f317f9918fd0dc31712fe1ac" }, "downloads": -1, "filename": "aiows-0.1a0-py3.6.egg", "has_sig": false, "md5_digest": "dd66cbf1790c3bd170b09949512eae26", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 14491, "upload_time": "2018-10-09T09:15:40", "url": "https://files.pythonhosted.org/packages/f8/1c/6b80dd27c1d9dd63f7e238e6a5baa932eb0f0ab9b3d65e2f279c5eb0ef8a/aiows-0.1a0-py3.6.egg" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a5d97f6569dc7db9ff48f996ce20e49a", "sha256": "4fdc3f6d920d6aaaa3bb84c14479a9f2c29cda27931ea141278a0557806be539" }, "downloads": -1, "filename": "aiows-0.1.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "a5d97f6569dc7db9ff48f996ce20e49a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10758, "upload_time": "2018-10-09T19:00:55", "url": "https://files.pythonhosted.org/packages/ac/0d/e77f88af8f94b30efcfc3f15ede6c5970503dfb91a7057b44e99fad07091/aiows-0.1.linux-x86_64.tar.gz" } ] }