Skip to main content

Django SocketIO Chat using python-socketio

Project description

Django SocketIO Chat

django-socketio-chat
Simple chat using python-socketio, and using django-allauth-simple-ui

Simple usage

Please check the README.md to know how to use django-allauth-simple-ui Alternatively, you can check the testproject for more details.

  1. Install by running the following command
pip install django-socketio-chat
  1. Add the following settings to your settings.py file
INSTALLED_APPS = [
    "django_socketio_chat",
    # etc
]
ALLAUTH_UI = dict(
    ADAPTER="django_socketio_chat.adapter.CustomUserAdapter",
    # etc
)
  1. Add the Chat URLs to your urls.py file
from django.urls import path, include
urlpatterns = [
   path('chat/', include("django_socketio_chat.urls")),
]
  1. Config wsgi.py to run SocketIO server
import os
import django

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'testproject.settings')
django.setup()

from socketio import WSGIApp
from django.core.wsgi import get_wsgi_application
from django_socketio_chat.server import ChatServer

application = WSGIApp(ChatServer().sio, get_wsgi_application())
  1. Collect Static files
python manage.py collectstatic --no-input

6Migrate the database

python manage.py migrate
  1. Using wsgi to run the project
gunicorn testproject.wsgi:application -b 0.0.0.0:8000 -w 1 -k eventlet --reload

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_socketio_chat-0.1.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

django_socketio_chat-0.1.0-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file django_socketio_chat-0.1.0.tar.gz.

File metadata

  • Download URL: django_socketio_chat-0.1.0.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.8.0-45-generic

File hashes

Hashes for django_socketio_chat-0.1.0.tar.gz
Algorithm Hash digest
SHA256 81c5823321dd5378fb21bc0a4f1db1305114ef96108a1b9be2e12d1b0054e1bf
MD5 d8681ab0e6affed4aab4be6ff144f7c5
BLAKE2b-256 187fb9975dbb478252ad6206230798be129b8e9e02a47cc166b5ec877e21d0bd

See more details on using hashes here.

File details

Details for the file django_socketio_chat-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_socketio_chat-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f9df0808881deabe9ee46bdf53cbcc10a43ccbd09bf1a1c3fa4341b704662989
MD5 928e860aebdc3958b536eb76e6e815d6
BLAKE2b-256 5070c36b536dc3d90a306d2e2e5fea84e2484ed2cf4ef592b88f70b66c904996

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page