Async Chatter App Based on Webscokets
Project description
Async Chatter App Based on Webscokets
Documentation
The full documentation is at https://django-chats.readthedocs.io.
Quickstart
Install chatter:
pip install django-chats
Add it to your INSTALLED_APPS:
INSTALLED_APPS = (
...
'chatter.apps.chatter',
...
)
Add chatter’s URL patterns:
from django.urls import re_path, include
from chatter import urls as chatter_urls
from chatter.api import urls as chatter_api_urls
urlpatterns = [
...
re_path(r'^', include(chatter_urls)),
re_path(r'^', include(chatter_api_urls)),
...
]
Redis need to be configured for group chatting:
import platform
# Configure the redis server
CHANNEL_LAYERS = {
'default': {
'BACKEND': 'channels_redis.core.RedisChannelLayer',
'CONFIG': {
"hosts": [('192.168.99.100', 6379) if platform.system()=='Windows' else ('127.0.0.1', 6379)],
},
},
}
Official acount username could be specified or by default: “official_user”
Features
Support Realtime communication through ASGI compatible Server
Automatically generated official account if not specified
Message implemented using django-restframework
Running Tests
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate (myenv) $ pip install tox (myenv) $ tox
Development commands
pip install -r requirements_dev.txt invoke -l
History
0.1.0 (2020-09-15)
First release on PyPI.
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-chats-0.1.1.tar.gz
(1.9 MB
view hashes)
Built Distribution
Close
Hashes for django_chats-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aef515671cfe2a4217b86079dc464a071836932a8b5d0cc28a01c4132b060550 |
|
MD5 | 32eba05202de8604bc1e628036ec941e |
|
BLAKE2b-256 | e586ae5b5d2a4928441d8372a7b43aea58af81b410826ee1ddb38d6b71c64c07 |