{ "info": { "author": "Chris Pickett", "author_email": "chris.pickett@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "===========\ndjango-echo\n===========\n\nDjango library for creating skills for the Amazon Echo (Alexa)\n\n===============\nGetting Started\n===============\n\ndjango-echo is mainly composed of three classes:\n\n- ``echo.skill.EchoSkill``: A subclass of Django's generic.View that handles routing intents and dealing with request data.\n- ``echo.request.EchoRequest``: A small wrapper around the JSON data in the request from Amazon.\n- ``echo.response.EchoResponse``: A subclass of Django's http.HttpResponse that knows how to generate a valid Amazon Echo response.\n\n\nCreating a Skill\n----------------\nA skill is a class that subclasses EchoSkill that provides intent handlers::\n\n from echo.skill import EchoSkill\n\n class HoroscopeSkill(EchoSkill):\n def get_horoscope(self, request, sign):\n # Ignore the sign because astrology is bunk.\n return self.respond(\n \"Today you need to act first and ask questions later!\",\n card=None,\n should_end_session=True\n )\n\n\nOn the Amazon side you would setup an intent called ``GetHoroscope`` that has\na ``sign`` slot, and when that intent is called this ``get_horoscope`` method\nwill be called with the slot data.\n\nThe ``self.respond`` is a helper method that essentially just acts as a\npass-through to ``EchoResponse``. You can also use SSML directly and\nEchoResponse will set the response up correctly::\n\n self.respond(\"Today you need to ask questions first and act later!\")\n\nThen you just need to wire the skill up to your urls.py::\n\n from django.conf.urls import url\n\n from .views import HoroscopeSkill\n\n urlpatterns = [\n url(\n regex=r'^horoscope/$',\n view=HoroscopeSkill.as_view(),\n name='horoscope_skill'\n )\n ]\n\n\nResponding With A Card\n----------------------\nEchoSkill provides a helper to create a simple card::\n\n return self.respond(\n \"What alexa should say\",\n card=self.create_simple_card(\"The card title\", \"The card's content\")\n )\n\n\nSession Handling\n----------------\nEchoSkill sets ``self.request`` to an instance of EchoRequest (it also saves\nthe http request to ``self.http_request``.) EchoRequest provides the session\nattributes via a ``session`` attribute::\n\n sign = self.request.session.get('sign')\n\n request.session.update({\n 'has_requested_horoscope': True\n })\n\nIf you use ``EchoSkill.respond`` this session data will be automatically\nattached to the response, otherwise you'll need to pass it when creating the\nresponse::\n\n return EchoResponse(\"Output text\", session=self.request.session)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bunchesofdonald/django-echo", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-echo", "package_url": "https://pypi.org/project/django-echo/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-echo/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/bunchesofdonald/django-echo" }, "release_url": "https://pypi.org/project/django-echo/0.2.2/", "requires_dist": null, "requires_python": null, "summary": "Django library for creating skills for the Amazon Echo (Alexa)", "version": "0.2.2" }, "last_serial": 2028638, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "90675871081fd84e0634b175be096e0e", "sha256": "8ae502325d4dfa2d4918cee2cbe60d6c61610b035356e84a2a9fad6b9400c1aa" }, "downloads": -1, "filename": "django-echo-0.1.0.tar.gz", "has_sig": false, "md5_digest": "90675871081fd84e0634b175be096e0e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2813, "upload_time": "2015-12-12T20:09:04", "url": "https://files.pythonhosted.org/packages/f5/4e/63491be3d9d0340adcabef39040f6f94c952fd31ead9444cbecda88cc398/django-echo-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "2010d2d21e12d404d5107e6f76559bdb", "sha256": "6a73b1c9fc01fa7058c68ba7dfe85ead2a66415a108dc4523111f7c8e325a3df" }, "downloads": -1, "filename": "django-echo-0.1.1.tar.gz", "has_sig": false, "md5_digest": "2010d2d21e12d404d5107e6f76559bdb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4735, "upload_time": "2015-12-19T18:19:38", "url": "https://files.pythonhosted.org/packages/66/2b/f234e1810a191b1fbf658534dcdf1410a80eea5c56ff6f123430d45ad3b2/django-echo-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "f06cdf416902c697f7e71e45dd530252", "sha256": "457d06c32f4cb30e3934d4297463311df9cddf42adca22904bab2a0bf8980510" }, "downloads": -1, "filename": "django-echo-0.1.2.tar.gz", "has_sig": false, "md5_digest": "f06cdf416902c697f7e71e45dd530252", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5537, "upload_time": "2015-12-20T18:12:22", "url": "https://files.pythonhosted.org/packages/05/1e/651eebd104a3f75fe0cc92eb340c1131bbda25f8b1bee85bcda8484f19a5/django-echo-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "2aa56d15bb4c8670105be92d56dfb2f8", "sha256": "4930f3567f9af4fcf591760ebd757abe5e09f240848c0e1fa4c2a6ad79084b34" }, "downloads": -1, "filename": "django-echo-0.2.0.tar.gz", "has_sig": false, "md5_digest": "2aa56d15bb4c8670105be92d56dfb2f8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6179, "upload_time": "2015-12-23T17:42:44", "url": "https://files.pythonhosted.org/packages/d2/da/4355a1ad734ad9fad1192c07e02acc76905e1fd0d5b6a9028066e6eab723/django-echo-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "594522ee520d927e9143360e37447a96", "sha256": "6f0e3cf7c4024e8db679724b1faa8f314b8a5560cbc41de3f1013337ec3b9877" }, "downloads": -1, "filename": "django-echo-0.2.1.tar.gz", "has_sig": false, "md5_digest": "594522ee520d927e9143360e37447a96", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8658, "upload_time": "2016-03-25T02:00:29", "url": "https://files.pythonhosted.org/packages/21/6b/2b123fcfadd0d406cb3fb727f83f3501a55c3dece24b093728e7b6d388d5/django-echo-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "e9db2cd68583b283e196424e78e4e2d6", "sha256": "b6163830433525560f6da9407a78ab18e856495abdbff60764e3d9be81dbf620" }, "downloads": -1, "filename": "django-echo-0.2.2.tar.gz", "has_sig": false, "md5_digest": "e9db2cd68583b283e196424e78e4e2d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8898, "upload_time": "2016-03-26T18:48:23", "url": "https://files.pythonhosted.org/packages/4a/6c/5e46c149004f07ece97aa812917ec1f6c62da5a21002409cae8a5a02a9d6/django-echo-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e9db2cd68583b283e196424e78e4e2d6", "sha256": "b6163830433525560f6da9407a78ab18e856495abdbff60764e3d9be81dbf620" }, "downloads": -1, "filename": "django-echo-0.2.2.tar.gz", "has_sig": false, "md5_digest": "e9db2cd68583b283e196424e78e4e2d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8898, "upload_time": "2016-03-26T18:48:23", "url": "https://files.pythonhosted.org/packages/4a/6c/5e46c149004f07ece97aa812917ec1f6c62da5a21002409cae8a5a02a9d6/django-echo-0.2.2.tar.gz" } ] }