アクセスいただきありがとうございます。こちらのページは現在英語のみのご用意となっております。順次日本語化を進めてまいりますので、ご理解のほどよろしくお願いいたします。

Python Tutorial

This Python tutorial will teach you how to build with Python. Build a Python project with our Python classes, samples, and resources.

 

The Alexa Skills Kit SDK for Python simplifies the development of the back-end cloud service for your Alexa skill. A part of the Alexa Skills Kit, the SDK reduces the amount of code you need to write to process Alexa requests and responses and to handle other common skill tasks.

Visit our GitHub repository to find everything you need to build more quickly, including samples listed below. Start building now to reach and delight customers through tens of millions of Alexa-enabled devices. You can also make money with Alexa by adding premium content to your skill with in-skill purchasing. Get started today to give your vision a voice. We can’t wait to see what you build.

Python Programming

You can use the following key features in the ASK SDK for Python.

Request Handling

Request handling in the SDK makes it easy for you to invoke the right code when Alexa sends you a request. You can write a single handler for multiple Alexa intents, or invoke different handlers based on nearly any request attribute. The ASK SDK for Python also introduces flexible handler registration, allowing you to use either decorators or traditional class-based implementations of handler features.

Response Building

You can deliver responses to your customers that include text-to-speech, audio and video streams, and cards and other visual elements. Customers will receive one or more of these elements depending on what Alexa-compatible device they are using. Using the SDK, you can build responses that include all of these elements.

Attribute Management

You can store and retrieve information at different scopes using attributes in the SDK. Attributes allow you to keep track of what happened so far, and to use this information to determine what happens next. You can define attributes

Alexa API Calls

You can call nearly any Alexa API from within your skill logic using service clients in the SDK. The service clients automatically inject relevant endpoint and authentication-token information on your behalf.

Sample Python Projects

Get started quickly using one of our samples below.

Fact Skill

Learn the ins and outs of the ASK SDK for Python with this simple fact skill.
See sample

City Guide

Learn how to call an API from within your skill to provide dynamic content to your customers.
See sample

Fact Skill with In-Skill Purchases

Learn how to monetize your skill with both one-time purchases and subscriptions.
See sample

Pet Match

Easily prompt for and parse multiple values from customers with dialog management and entity resolution.
See sample

How-To Skill

Teach your skill how to be multilingual using Python's internationalization library.
See sample

Quiz Game

Configure your skill to support displays on Alexa-enabled devices with a screen.
See sample

Python Class and Resources
Python Classes and APIs

The Alexa APIs for Python consists of python classes that represent the request and response JSON of Alexa services.
Learn more

Hello World Python Class Tutorial

This tutorial will walk first-time Alexa skills developers through all the required steps involved in creating a skill using this hello world template, called ‘hello world’.
See sample

Python Tutorial Versions
Visit Our GitHub Repository to Get Started

Additional Python Programming Tools

Alexa Video Series for Python Developers

By Coding Dojo

Calling aspiring and established Python coders alike! Learn how to build skills for Alexa

Watch the series

Tutorial for Python Programmers

By PythonProgramming.net

Learn to build an Alexa skill in Python that goes to the World News subreddit, a popular feed on news aggregator Reddit, and reads the latest headlines.

Watch the course

Subscribe to Our Newsletter

Manage Email Preferences