Package: django-ask-sdk
Django ASK SDK - Extending ASK SDK to work with Djangodjango-ask-sdkis the extension package, that will let skill developers
useASK SDKpackage in their Django application. It provides an easy way to register and
useskills as custom webservices.Quick StartIf you already have a skill built using the ASK SDK skill builders, then you
only need to do the following, to set this up in your django app (example_app):example_app/my_skill.pyfromask_sdk_core.skill_builderimportSkillBuilderfromask_sdk_core.handler_inputimportHandlerInputfromask_sdk_core.dispatch_componentsimportAbstractRequestHandlerfromask_sdk_core.utilsimportis_request_typefromask_sdk_modelimportResponsesb=SkillBuilder()classLaunchRequestHandler(AbstractRequestHandler):"""Handler for skill launch."""defcan_handle(self,handler_input):# type: (HandlerInput) -> boolreturnis_request_type("LaunchRequest")(handler_input)defhandle(self,handler_input):# type: (HandlerInput) -> Responsespeech="Hello"handler_input.response_builder.speak(speech)returnhandler_input.response_builder.response# Other skill components here ....# Register all handlers, interceptors etc.# For eg : sb.add_request_handler(LaunchRequestHandler())skill=sb.create()example_app/urls.pyfrom.my_skillimportskillfromdjango_ask_sdk.skill_adapterimportSkillAdaptermy_skill_view=SkillAdapter.as_view(skill=skill)urlpatterns=[path('/',my_skill_view,name='index'),]Are you planning to deploy your skill on AWS Lambda? Then, you don’t even
need this package. TheASK SDKprovides alambda_handlerthat can be
directly used in your lambda console.More code examples can be foundhere.FeaturesWorks as an extension on skills built using ASK SDK. No need to learn
something new.Provides default request signature and request timestamp verification.
These can be configured on app level by setting / unsetting default
parameters on the view.Provides a way to register multiple skills on your app, at different
endpoints.InstallationNoteThis package is compatible only withPython >= 3.6, since it
requiredDjango >= 2.0which is onlyPython3compatible.Importantcryptographyis a dependency for this package. If you have not
already installedcryptography, you might need to
install additional prerequisites as detailed in thecryptography installation guidefor your operating system.Assuming that you have Python andvirtualenvinstalled, you can
install the package and it’s dependencies (ask-sdk-webservice-support)
from PyPi as follows:$virtualenvvenv$.venv/bin/activate$pipinstalldjango-ask-sdkThis package isnotinstalled along-sideask-sdkstandard distribution,
and has to be installed separately if you need support for skill
deployment as webservice, using Django.SDK Usage and Getting StartedGetting started guides, SDK Features, API references, samples etc. can
be found in thetechnical documentationGot Feedback?We would like to hear about your bugs, feature requests, questions or
quick feedback. Please search for theexisting issuesbefore opening a new one. It would also be helpful if you follow the
templates for issue and pull request creation. Please follow thecontributing guidelines!!Request and vote forAlexa features!CHANGELOG0.1Initial release of Django ASK SDK extension package.0.1.1This release contains the following changes :Fix setting the custom user agent on the skill instance, when initializing the handler.1.0.0This release contains the following changes :Move the webservice adapters to GA.