Today, we are happy to announce the general availability of the Alexa Skills Kit (ASK) SDK for Python. We've incorporated much of your feedback since the beta release of the SDK in June, and have added new samples to help you get started quickly. You can use the ASK SDKs—now available for Python, Node.js, and Java—to simplify development of the back-end cloud service for your Alexa skill.
Write Less Boilerplate Code
As we shared when we launched the beta version of the SDK, our goal is to reduce the amount of code you need to write to process Alexa requests and responses and to handle other common skill tasks. You can use the following key features:
- 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 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 that persist for a single request, for a single customer session, or for the lifetime of your skill.
- 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.
Bootstrap Your Next Alexa Skill Project with Six New Samples
You can take advantage of six new samples:
- Simple Facts - Learn the ins and outs of the ASK SDK for Python with this simple fact skill.
- City Guide - Demonstrates how to call an API from within your skill to provide dynamic content to your customers.
- Fact In-Skill Purchases - Learn how to monetize your skill with both one-time purchases and subscriptions.
- Pet Match - Easily prompt for and parse multiple values from customers with dialog management and entity resolution.
- How-To - Teach your skill how to be multi-lingual using Python's internationalization library.
- Quiz Game - Configure your skill to support displays on Alexa-enabled devices with a screen.
Tell Us What You Think
Visit the alexa-skills-kit-sdk-for-python repository on GitHub to find everything you need, including the samples described above. Try it today, and tell us what you think. Create a GitHub issue on the repository to provide feature requests and feedback on issues you encounter.
Build Your First Skill, Get a T-Shirt
Bring your big idea to life with Alexa and earn perks through our milestone-based developer promotion. US developers, publish your first Alexa skill and earn a custom Alexa developer t-shirt. If you're not in the US, check out our promotions in Canada, the UK, Germany, Japan, France, Australia, and India. Learn more about our promotion and start building today. We can’t wait to see what you build.