# django5-websocket **Repository Path**: seliencepuppet/django5-websocket ## Basic Information - **Project Name**: django5-websocket - **Description**: 使用python实现的websocket聊天功能 - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2023-08-16 - **Last Updated**: 2025-05-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # python实现websocket功能 ```shell C:\python3.11.2\Scripts>pip.exe install -i https://mirrors.aliyun.com/pypi/simple pillow C:\python3.11.2\Scripts>pip.exe install -i https://mirrors.aliyun.com/pypi/simple django-cors-headers C:\python3.11.2\Scripts>pip.exe install -i https://mirrors.aliyun.com/pypi/simple djangorestframework C:\python3.11.2\Scripts>pip.exe install -i https://mirrors.aliyun.com/pypi/simple djangorestframework-jwt C:\python3.11.2\Scripts>pip.exe install -i https://mirrors.aliyun.com/pypi/simple channels C:\python3.11.2\Scripts>pip.exe install -i https://mirrors.aliyun.com/pypi/simple channels-redis C:\python3.11.2\Scripts>pip install -U channels["daphne"] -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/ ``` 启动方法 ```commandline D:\GITEE\python-chat-webSocket>c:\python3.11.2\python.exe manage.py runserver 0.0.0.0:8000 ``` ```commandline C:\python3.11.2\Scripts>pip.exe list Package Version ------------------------ -------- aioredis 1.3.1 anyio 3.6.2 argon2-cffi 21.3.0 argon2-cffi-bindings 21.2.0 arrow 1.2.3 asgiref 3.7.2 asttokens 2.2.1 async-timeout 4.0.3 attrs 22.2.0 autobahn 23.6.2 Automat 22.10.0 backcall 0.2.0 bcrypt 4.0.1 beautifulsoup4 4.11.2 bleach 6.0.0 blinker 1.6.2 cachetools 5.3.1 certifi 2023.5.7 cffi 1.15.1 channels 4.0.0 channels-redis 4.1.0 charset-normalizer 3.1.0 click 8.1.6 colorama 0.4.6 comm 0.1.2 constantly 15.1.0 cryptography 41.0.3 daphne 4.0.0 debugpy 1.6.6 decorator 5.1.1 defusedxml 0.7.1 Django 4.1.7 django.contrib 0.0.1 django-cors-headers 4.1.0 django-crontab 0.7.1 djangorestframework 3.14.0 djangorestframework-jwt 1.11.0 dnspython 2.3.0 et-xmlfile 1.1.0 executing 1.2.0 fastjsonschema 2.16.3 Flask 2.3.2 fqdn 1.5.1 google-auth 2.21.0 hiredis 2.2.3 hyperlink 21.0.0 idna 3.4 incremental 22.10.0 ipykernel 6.21.3 ipython 8.11.0 ipython-genutils 0.2.0 ipywidgets 8.0.4 isoduration 20.11.0 itsdangerous 2.1.2 jedi 0.18.2 Jinja2 3.1.2 jsonpointer 2.3 jsonschema 4.17.3 jupyter 1.0.0 jupyter_client 8.0.3 jupyter-console 6.6.2 jupyter_core 5.2.0 jupyter-events 0.6.3 jupyter_server 2.3.0 jupyter_server_terminals 0.4.4 jupyterlab-pygments 0.2.2 jupyterlab-widgets 3.0.5 jupytext 1.14.5 kafka 1.3.5 kubernetes 26.1.0 markdown-it-py 2.2.0 MarkupSafe 2.1.2 matplotlib-inline 0.1.6 mdit-py-plugins 0.3.5 mdurl 0.1.2 mistune 2.0.5 msgpack 1.0.5 nbclassic 0.5.3 nbclient 0.7.2 nbconvert 7.2.9 nbformat 5.7.3 nest-asyncio 1.5.6 notebook 6.5.2 notebook_shim 0.2.2 numpy 1.24.2 oauthlib 3.2.2 openpyxl 3.1.2 packaging 23.0 pandas 1.5.3 pandocfilters 1.5.0 paramiko 3.3.1 parso 0.8.3 pickleshare 0.7.5 Pillow 10.0.0 pip 23.2.1 platformdirs 3.1.0 prometheus-client 0.16.0 prompt-toolkit 3.0.38 psutil 5.9.4 pure-eval 0.2.2 pyasn1 0.5.0 pyasn1-modules 0.3.0 pycparser 2.21 pycryptodome 3.18.0 Pygments 2.14.0 PyJWT 1.7.1 PyMySQL 1.0.2 PyNaCl 1.5.0 pyOpenSSL 23.2.0 pyrsistent 0.19.3 python-dateutil 2.8.2 python-etcd 0.4.5 python-json-logger 2.0.7 pytz 2022.7.1 pywin32 305 pywinpty 2.0.10 PyYAML 6.0 pyzmq 25.0.0 qtconsole 5.4.0 QtPy 2.3.0 redis 4.5.4 requests 2.31.0 requests-oauthlib 1.3.1 rest-framework-simplejwt 0.0.2 rfc3339-validator 0.1.4 rfc3986-validator 0.1.1 rsa 4.9 scandir 1.10.0 Send2Trash 1.8.0 service-identity 23.1.0 setuptools 65.5.0 six 1.16.0 sniffio 1.3.0 soupsieve 2.4 sqlparse 0.4.3 stack-data 0.6.2 terminado 0.17.1 tinycss2 1.2.1 toml 0.10.2 tornado 6.2 traitlets 5.9.0 Twisted 22.10.0 twisted-iocpsupport 1.0.4 txaio 23.1.1 typing_extensions 4.7.1 tzdata 2022.7 uri-template 1.2.0 urllib3 1.26.15 wcwidth 0.2.6 webcolors 1.12 webencodings 0.5.1 websocket-client 1.5.1 Werkzeug 2.3.6 widgetsnbextension 4.0.5 xlrd 0.9.4 xlwings 0.30.2 xlwt 1.3.0 zope.interface 6.0 ```