Skip to main content

The Flask ASK SDK package provides support for using ASK SDK and Flask, to deploy custom skills as webservice

Project description

Flask ASK SDK - Extending ASK SDK to work with Flask

flask-ask-sdk is the extension package, that will let skill developers use ASK SDK package in their Flask application. It provides an easy way to register and use skills as custom webservices.

Quick Start

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 flask app:

from flask import Flask
from ask_sdk_core.skill_builder import SkillBuilder
from flask_ask_sdk.skill_adapter import SkillAdapter

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

app = Flask(__name__)
skill_response = SkillAdapter(
    skill=sb.create(), skill_id=<YOUR_SKILL_ID>, app=app)

skill_response.register(app=app, route="/")

if __name__ == '__main__':
    app.run()

Are you planning to deploy your skill on AWS Lambda? Then, you don’t even need this package. The ASK SDK provides a lambda_handler that can be directly used in your lambda console.

More code examples can be found here.

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. These can be configured on app level by setting / unsetting app configuration.

  • Provides a way to register multiple skills on your app, at different endpoints.

Installation

Assuming that you have Python and virtualenv installed, you can install the package and it’s dependencies (ask-sdk-webservice-support, flask) from PyPi as follows:

$ virtualenv venv
$ . venv/bin/activate
$ pip install flask-ask-sdk

This package is not installed along-side ask-sdk standard distribution, and has to be installed separately if you need support for skill deployment as webservice, using Flask.

SDK Usage and Getting Started

Getting started guides, SDK Features, API references, samples etc. can be found in the technical documentation

Got Feedback?

  • We would like to hear about your bugs, feature requests, questions or quick feedback. Please search for the existing issues before opening a new one. It would also be helpful if you follow the templates for issue and pull request creation. Please follow the contributing guidelines!!

  • Request and vote for Alexa features!

CHANGELOG

0.1

  • Initial release of Flask ASK SDK extension package.

0.1.1

This release contains the following changes :

  • Fix setting the custom user agent on the skill instance, when initializing the handler.

1.0.0

This release contains the following changes :

  • Move the webservice adapters to GA.

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

flask-ask-sdk-1.0.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

flask_ask_sdk-1.0.0-py2.py3-none-any.whl (7.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file flask-ask-sdk-1.0.0.tar.gz.

File metadata

  • Download URL: flask-ask-sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for flask-ask-sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b6fdedb1365fc970c61c0f63da5e3c45debc0ce45cdc17befaa9b6d9bb9815d0
MD5 383d222683154c3b32f7a7023f65d511
BLAKE2b-256 3bdb5aa6a7d455a37db8df935b3f59a8f149f120cd7b70cb2b837b459acc3746

See more details on using hashes here.

File details

Details for the file flask_ask_sdk-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: flask_ask_sdk-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for flask_ask_sdk-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 48238643f2eff67798f459e02e40648bd7a2e28317236c1a2cd4cbee5b04aae7
MD5 9a25d089736b433758c20437ab2fc283
BLAKE2b-256 c606a97ee4dc6754d5d577f39c05e64ebafaab571ff0a529bd2bb60944c9c4a5

See more details on using hashes here.

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