{ "info": { "author": "Neo hu", "author_email": "9656951@qq.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# django-websocket-channel\nWebsocket support for Django using Redis\n\n\n#Installation\n\n
\nsudo service redis-server start\n\n\n\n
\npip install django-websocket-channel\n\n\n\n#Configuration\n\n
\nINSTALLED_APPS = (\n ...\n 'websocket_channel',\n ...\n)\n\n\n\n
\nWS_REDIS = {\n 'host': 'localhost',\n 'port': 6379,\n 'db': 0,\n 'password': None,\n }\n\n\n\nTEMPLATE_CONTEXT_PROCESSORS = (\n ...\n 'django.contrib.auth.context_processors.auth',\n 'django.core.context_processors.static',\n 'websocket_channel.context_processors.default',\n ...\n)\n\n\n\n\ndjango 1.8\n\n\n
\nTEMPLATES = [\n {\n '''\n 'OPTIONS': {\n 'context_processors': [\n '''\n 'django.template.context_processors.static',\n 'django.contrib.messages.context_processors.messages',\n 'websocket_channel.context_processors.default',\n '''\n ],\n },\n },\n]\n\n\n\n\n\n#NGiNX\n\nserver {\n\t'''\n\tlocation /ws/ {\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n proxy_pass http://unix:/tmp/websocket_channel_websocket.socket;\n }\n location / {\n include uwsgi_params;\n uwsgi_pass unix:/tmp/websocket_channel.socket;\n\n }\n\n '''\n\n}\n\n\n#uWSGI:\n\n\n[default]\ngid = www-data\nuid = www-data\numask = 002\n;virtualenv = virtualenv/path\nmaster = true\nenv=DJANGO_SETTINGS_MODULE=settings\n\n\nenv=PYTHON_EGG_CACHE=/tmp/websocket_channel\nenv=LANG=zh_CN.UTF-8\nenv=LC_ALL=zh_CN.UTF-8\nignore-sigpipe = true\nenable-threads = true\nchmod-socket = 666\nchdir = project/path/to\npythonpath = project/path/to\nmax-requests = 500000\n\n\n\n[runserver]\nini = :default\nsocket = /tmp/websocket_channel.socket\npidfile = /tmp/websocket_channel.pid\nmodule = wsgi\nbuffer-size = 32768\nprocesses = 4\ndaemonize = project/path/to/web.log\n\n[wsserver]\nini = :default\nhttp-socket = /tmp/websocket_channel_websocket.socket\npidfile = /tmp/websocket_channel_websocket.pid\ndaemonize = project/path/to/websocket_web.log\nmodule = wsgi_websocket\nprocesses = 1\nhttp-websockets = true\ngevent=1000\n\n\n\n\n#Then start uWSGI:\n
\nuwsgi --ini uwsgi.ini:runserver\nuwsgi --ini uwsgi.ini:wsserver\n\n\n\n#Client JavaScript\n
\n\n\n\n\n\n\n#Subscribe to Broadcast Notifications\n
\n RedisPublisher(\"channel\").publishgit _message(\"1111111111\")\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/neo-hu/django-websocket-channel", "keywords": "django,websocket,redis", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-websocket-channel", "package_url": "https://pypi.org/project/django-websocket-channel/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-websocket-channel/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/neo-hu/django-websocket-channel" }, "release_url": "https://pypi.org/project/django-websocket-channel/0.0.5/", "requires_dist": null, "requires_python": null, "summary": "Websocket support for Django using Redis", "version": "0.0.5" }, "last_serial": 1570148, "releases": { "0.0.3": [], "0.0.4": [ { "comment_text": "", "digests": { "md5": "0d90ce469d58afa409c55d44736fb418", "sha256": "f2a314d4258489eda3212bbef78d08bf4e135b4d7d35306acddaf5d25be99fad" }, "downloads": -1, "filename": "django-websocket-channel-0.0.4.tar.gz", "has_sig": false, "md5_digest": "0d90ce469d58afa409c55d44736fb418", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12680, "upload_time": "2015-05-31T15:37:08", "url": "https://files.pythonhosted.org/packages/f7/00/18842d03761ecddb32eadc1cc1879647edb403014e94834a01dc251aee68/django-websocket-channel-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "72404a811110e3ebe29b1233163ef04b", "sha256": "5afb0e4c72cc1a310c10d1c23813c4e88bd1156f0a1389366a6fc6f3c35999c1" }, "downloads": -1, "filename": "django-websocket-channel-0.0.5.tar.gz", "has_sig": false, "md5_digest": "72404a811110e3ebe29b1233163ef04b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14997, "upload_time": "2015-05-31T16:22:45", "url": "https://files.pythonhosted.org/packages/98/b1/3c2ecb6315891a9a594105247a2cf1415250ac0175be8edd9c68523a1042/django-websocket-channel-0.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "72404a811110e3ebe29b1233163ef04b", "sha256": "5afb0e4c72cc1a310c10d1c23813c4e88bd1156f0a1389366a6fc6f3c35999c1" }, "downloads": -1, "filename": "django-websocket-channel-0.0.5.tar.gz", "has_sig": false, "md5_digest": "72404a811110e3ebe29b1233163ef04b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14997, "upload_time": "2015-05-31T16:22:45", "url": "https://files.pythonhosted.org/packages/98/b1/3c2ecb6315891a9a594105247a2cf1415250ac0175be8edd9c68523a1042/django-websocket-channel-0.0.5.tar.gz" } ] }