Skip to main content

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.

Metadata

Release files for flask-ask-sdk 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flask-ask-sdk 1.0.0
File Size Uploaded Provenance
flask-ask-sdk-1.0.0.tar.gz 6.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for flask-ask-sdk 1.0.0
File Interpreter ABI Platform
flask_ask_sdk-1.0.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 14.7 kB

Release files / flask-ask-sdk-1.0.0.tar.gz

Download URL flask-ask-sdk-1.0.0.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b6fdedb1365fc970c61c0f63da5e3c45debc0ce45cdc17befaa9b6d9bb9815d0
BLAKE2b-256 checksum
How to use checksums
3bdb5aa6a7d455a37db8df935b3f59a8f149f120cd7b70cb2b837b459acc3746
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / flask_ask_sdk-1.0.0-py2.py3-none-any.whl

Download URL flask_ask_sdk-1.0.0-py2.py3-none-any.whl
Size 7.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
48238643f2eff67798f459e02e40648bd7a2e28317236c1a2cd4cbee5b04aae7
BLAKE2b-256 checksum
How to use checksums
c606a97ee4dc6754d5d577f39c05e64ebafaab571ff0a529bd2bb60944c9c4a5
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for flask-ask-sdk 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page