Skip to main content

CherryPy ASK SDK - Extending ASK SDK to work with CherryPy

Project description

Extending Ask SDK to work with CherryPy.

Quick Start

Mandatory warning from the upstream ask-sdk for python.

If 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 CherryPy application:

import cherrypy
import cherrypy_ask_sdk
from ask_sdk_core.skill_builder import SkillBuilder

sb = SkillBuilder()
# Register all handlers, interceptors etc.
# For eg : sb.add_request_handler(LaunchRequestHandler())

# add the ask_sdk_skill tool in the global ``cherrypy.tools`` toolbox.
# Passing the cherrypy.tools toolbox is the default, but passing it
# explicitly just to make it more explicit.
cherrypy_ask_sdk.add_in_toolbox(cherrypy.tools)

if __name__ == '__main__':
    cherrypy.quickstart(
        config={
            '/': {
                'tools.ask_sdk_skill.on': True,
                'tools.ask_sdk_skill.skill': sb.create(),
                'tools.ask_sdk_skill.verify_signature': True,
                'tools.ask_sdk_skill.verify_timestamp': True
            }
        }
    )

Installation

pip install cherrypy-ask-sdk

Features

  • Works as an extension on skills built using ASK SDK. No need to learn something new.

  • Provides default request signature and request timestamp verification.

  • Provides a way to register multiple skills in the tree.

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

cherrypy-ask-sdk-0.1.1.tar.gz (7.5 kB view hashes)

Uploaded Source

Built Distribution

cherrypy_ask_sdk-0.1.1-py2.py3-none-any.whl (8.1 kB view hashes)

Uploaded Python 2 Python 3

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