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.1.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for django_socketio_chat-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9c79a70aa5bd559b403523ea2741725a9423edf0667dde0d036819080b2cc3bd
MD5 3f4780872f65f2ea06355cae3fa906f7
BLAKE2b-256 b7cb60a6004878f7180251cbe97fb599fd89c04826cfa1f4e5895ea28e56cdd0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_socketio_chat-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 319668239c031f52968fbe0da3373e5afdc06d6ac38fad4352c2e3131a9fa3d6
MD5 c1136f5cf1e75dff7528f9ee0e0f7ad2
BLAKE2b-256 0facb3b232b2f0ede5aae62b88ec2a6906afe3582c91bea15adcbd89871430c2

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