Skip to main content

A package for learning first steps with Alexa skills

Project description

https://travis-ci.org/means-to-meaning/FirstAlexaSkills.svg?branch=master Documentation Status

Welcome to the wonderful world of Alexa interactions! Do you have great ideas for teaching Alexa new skills? There are only two steps to make a third-party skill using the Alexa Skills Kit:

  • creating an Alexa skill (ASK) which will convert your speech into intents (think of them as events for now) which you define - by associating utterances (sentences) to intents. For more details, take a look at the official ASK starter guide.
  • creating an AWS Lambda function or a web service that will receive the intents from Alexa. This package uses AWS Lambda functions because they are ideal for simple functions - low cost and zero infrastructure maintainance. You can find the official documentation here. If you are interested in a web service approach to ASK with Python, then you should definitely try John Wheeler’s great flask-ask package.

You can install FirstAlexaSkills with:

$ pip install firstalexaskills

You will also need to setup credentials to use AWS Lambda from to console and a developer account to create an Alexa skill. For more details, see the installation guide.

Here is all it takes to create, upload, test, modify, re-upload and re-test your first AWS Lambda skill function with AlexaFirstSkills:

$ mkdir alexa_development
$ unpack_example_skills # unpacks Alexa skill examples to ./example_skills
$ cd example_skills # Explore the Alexa skills in this directory
$ cd alexa_skill_first # Once ready, create your own AWS Lambda function
$ create_lambda_function --function-name skill_first --dir .
Function succesfully created!
AWS Lambda function ARN: arn:aws:lambda:your_aws_region:your_account_id:function:skill_first
$ test_lambda_function --function-name skill_first --test-data tests/data/lambda_test_data.json
... test output ...
$ idle lambda_function.py # modify the skill
$ update_lambda_function --function-name skill_first --dir . # update function in the cloud
$ test_lambda_function --function-name skill_first --test-data tests/data/lambda_test_data.json
... test updated output ...

You can install FirstAlexaSkills with:

$ pip install FirstAlexaSkills

You will also need to setup credentials to use AWS Lambda from to console and a developer account to create an Alexa skill. For more details, see the installation guide.

The package contains example Alexa skills, utilities and tutorials that will guide you from simply getting the Echo to reply, to setting your home temperature using the IoT device of your choice. Most importantly though, it allows you to develop locally, sync your local Lambda function to the cloud and immediately test it using a fake Alexa event in one button press. Something that might come in handy when building your own skills later.

New to programming, or Python? Checkout the 15 minute mini-intro! If you are thinking of setting up a hackathon to develop some new third-party Alexa skills, this guide has you covered!

Discussion

If you run into any issues you can file them in the issue tracker.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
FirstAlexaSkills-0.2.0.tar.gz (114.3 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page