{ "info": { "author": "Josh Smith", "author_email": "josh@joshsmith.codes", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django", "Framework :: Django :: 2.1", "Framework :: Django :: 2.2", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "django-channels-handlers\n========================\n\n.. image:: https://img.shields.io/pypi/v/channels_handlers.svg\n :target: https://pypi.python.org/pypi/channels_handlers\n :alt: Latest PyPI version\n\n.. image:: https://travis-ci.com/joshua-s/django-channels-handlers.svg?branch=master\n :target: https://travis-ci.com/joshua-s/django-channels-handlers\n\nDjango Channels, without the Pain \ud83d\udc8a\n\n\nRequirements\n------------\n\n- Django>=2.1\n- channels>=2.2\n- pydantic>=0.32\n\n\nUsage\n-----\n\nInstall django-channels-handlers from pypi::\n\n pip install django-channels-handlers\n\nCreate a message handler\n\n.. code:: python\n\n from channels_handlers.handlers import MessageHandler\n # For async, import AsyncMessageHandler\n\n\n class ChatHandler(MessageHandler):\n namespace = \"chat\"\n handled_types = {\n \"chat.message\": \"receive_message\",\n }\n models = {\n \"chat.message\": pydantic_models.Message,\n }\n\n def receive_message(self, message):\n # Do something with the message\n pass\n\nImport ConsumerHandlerMixin and add it to your Django Channels consumer\n\n.. code:: python\n\n from channels_handlers.consumers import ConsumerHandlerMixin\n # For async, import AsyncConsumerHandlerMixin\n from channels.generic.websocket import JsonWebsocketConsumer\n\n\n class MyConsumer(ConsumerHandlerMixin, JsonWebsocketConsumer):\n handler_classes = [ChatHandler]\n\n\nCompatibility\n-------------\n\n`django-channels-handlers` is compatible with Python 3.6+, Django 2.1+, and Django Channels 2.2+.\n\n\nLicense\n-------\n\n`django-channels-handlers` is licensed under the MIT License.\n\n\nAuthors\n-------\n\n`django-channels-handlers` was written by `Josh Smith `_.\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/joshua-s/django-channels-handlers", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-channels-handlers", "package_url": "https://pypi.org/project/django-channels-handlers/", "platform": "", "project_url": "https://pypi.org/project/django-channels-handlers/", "project_urls": { "Homepage": "https://github.com/joshua-s/django-channels-handlers" }, "release_url": "https://pypi.org/project/django-channels-handlers/0.1.0/", "requires_dist": [ "Django (>=2.1)", "channels (~=2.2)", "pydantic (~=0.32)", "pytest (~=5.0) ; extra == 'tests'", "pytest-django (~=3.5) ; extra == 'tests'", "pytest-asyncio (~=0.10) ; extra == 'tests'", "pytest-cov (>=2.7) ; extra == 'tests'", "black (>=19.3b0) ; extra == 'tests'", "flake8 (>=3.7) ; extra == 'tests'" ], "requires_python": ">=3.6", "summary": "Django Channels, without the Pain \ud83d\udc8a", "version": "0.1.0" }, "last_serial": 5658408, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "869154ede0a3f80f135206e0e8c1224a", "sha256": "a111e09fdc7adbb1f6ccf8bd4766defd3c2d609db080eed42b945a84e871c15c" }, "downloads": -1, "filename": "django_channels_handlers-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "869154ede0a3f80f135206e0e8c1224a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 5118, "upload_time": "2019-08-10T02:38:03", "url": "https://files.pythonhosted.org/packages/48/b5/cb1ea89b65f7dfe37d9f2f434303085b70660f9395dfb895ba6e5b4c19cc/django_channels_handlers-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5198f7c78574de625063db46df79d40b", "sha256": "697b29f5686355ee82943edd91c1f925055f913f0bb42391b47c92ac773c3541" }, "downloads": -1, "filename": "django-channels-handlers-0.1.0.tar.gz", "has_sig": false, "md5_digest": "5198f7c78574de625063db46df79d40b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 3277, "upload_time": "2019-08-10T02:38:06", "url": "https://files.pythonhosted.org/packages/17/02/e7bb055ddcc14fc97cd52bc87b5d1a77618b39f95929a7bffbb33430ec88/django-channels-handlers-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "869154ede0a3f80f135206e0e8c1224a", "sha256": "a111e09fdc7adbb1f6ccf8bd4766defd3c2d609db080eed42b945a84e871c15c" }, "downloads": -1, "filename": "django_channels_handlers-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "869154ede0a3f80f135206e0e8c1224a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 5118, "upload_time": "2019-08-10T02:38:03", "url": "https://files.pythonhosted.org/packages/48/b5/cb1ea89b65f7dfe37d9f2f434303085b70660f9395dfb895ba6e5b4c19cc/django_channels_handlers-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5198f7c78574de625063db46df79d40b", "sha256": "697b29f5686355ee82943edd91c1f925055f913f0bb42391b47c92ac773c3541" }, "downloads": -1, "filename": "django-channels-handlers-0.1.0.tar.gz", "has_sig": false, "md5_digest": "5198f7c78574de625063db46df79d40b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 3277, "upload_time": "2019-08-10T02:38:06", "url": "https://files.pythonhosted.org/packages/17/02/e7bb055ddcc14fc97cd52bc87b5d1a77618b39f95929a7bffbb33430ec88/django-channels-handlers-0.1.0.tar.gz" } ] }