What is Flask-Ask?
With the Amazon Echo, you ask "Alexa" to play songs, get the weather, and report scores. Those "skills", as they're called, have an open API for building conversational apps. Flask-Ask is an Alexa Skills Kit for Python that makes programming the Amazon Echo super easy.

Alexa Skills Kit / Building Responses with John Wheeler


Building Responses Details
  • 3m 50s
  • Appropriate for all
  • 06-21-2016
  • Updated 06-21-2016

Key Concepts: Statements, Questions, Cards, Reprompts

The Alexa Skills Kit is built on its own request and response model on top of HTTP's. In this video, you'll use Flask-Ask to construct the audio and visual responses Echo devices render back to users. Build ask and tell responses with statements, questions, cards, and reprompts.

About the author

John Wheeler is the creator of Flask-Ask He's been developing for two decades in Java, JavaScript, Python, C# and Ruby. He lives in San Diego with his wife, daughter, and twin boys. Follow him on Twitter.

Subject: Alexa Skills Kit
Author: John Wheeler
intent_schema.json
{
    "intents": [{
        "intent": "MyNameIsIntent",
        "slots": [{
            "name": "firstname",
            "type": "AMAZON.US_FIRST_NAME"
        }]
    }, {
        "intent": "WhatIsMyNameIntent"
    }]
}

sample_utterances.txt
MyNameIsIntent {firstname}
MyNameIsIntent my name is {firstname}
WhatIsMyNameIntent ask me what my name is

demo.py
import logging
from flask import Flask
from flask_ask import Ask, statement, question


app = Flask(__name__)
ask = Ask(app, "/")

log = logging.getLogger()
log.addHandler(logging.StreamHandler())
log.setLevel(logging.DEBUG)
logging.getLogger("flask_ask").setLevel(logging.DEBUG)


@ask.intent("MyNameIsIntent")
def my_name_is(firstname):
    msg = "Your name is {}".format(firstname)
    return statement(msg).simple_card("Hello {}".format(firstname), msg)


@ask.intent("WhatIsMyNameIntent")
def what_is_my_name():
    return question("What is your name?").reprompt("May I please have your name?")
Building Responses Discussion
Tutorial Playlist
Flask-Ask Quickstart
Project Bootstrap, Alexa Skills Kit, Flask-Ask, ngrok

4m 48s

Request Handling
Launch Requests, Intent Requests, Session Ended Requests

3m 17s

Building Responses
Statements, Questions, Cards, Reprompts

3m 50s

Intent Slots
Slots, Null Values, Default Values

3m 37s

Slot Conversions
Using Built-ins, Custom Callables, Error Handling

5m 40s

Conversion Helpers
Amazon Data Types, Python datetime Package

4m 27s

With more on the way!