This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

PyAlexa-Skill is an Open Source licensed Python package with a base class that support the necessary methods for an Alexa Skill set and two scripts to help with the creation of the main entry point and the packaging of the AWS Lambda Function for the Alexa Skill Set.

AlexaBaseHandler class

The AlexaBaseHandler class is an abstract class that provides the necessary framework to build the necessary response hooks for an Alexa application.

All of the abstract methods of this class must be implemented by the concrete implementation class. See the base class for details on the abstract methods.

process_request

This method will take the 2 parameters that are sent to the lambda function and determine which of the Alexa handlers to invoke.

For the Amazon Built-in requests such as AMAZON.YesIntent, process request will call a method of the form: on_<intentname>_intent, e.g. on_yes_intent(). It is expected that the concrete implementation will have a the necessary methods to support the built-in intents.

For custom intents, such as, MyCustomIntent, process request will call a method of the form: on_<intentname>_intent, e.g. on_mycustomintent_intent(). In this case, no assumption is made about the custom intent name, so the entire name is lower cased, then used in the creation of the dynamic method call.

For Amazon Built-in requests such as AudioPlayer.PlaybackStarted, process request will call a method of the form: on_<major name>_<minor name>, e.g. on_audioplayer_playbackstarted().

If any of the dynamically called methods is not found, a NotImplementedError exception is raised.

_build_speechlet_response

This method ( from the Alexa color example ) will put together the speechlet portion into a properly formatted json message. This is typically called by the concrete implementations of the AlexaBaseHandler.

_build_response

This method (from the Alexa color example ) will construct a properly formatted response message so the Amazon Echo knows what to respond with.

AlexaDeploymentHandler class

This class is a reference implementation that does nothing useful. All Alexa handlers are handled the same way.

To create the concrete implementation use the following:

from pyalexaskill import AlexaBaseHandler
class MyConcreteAlexaHandler(AlexaBaseHandler.AlexaBaseHandler):
    # implement the abstract methods

main.py

This file contains the main entry point of the lambda function that is called for the Alexa skill.

lambda_handler(event, context)

This method ( which can be called anything, you just need to configure it in the lambda handler ), is the method that is called with the 2 parameters.

This method will typically instantiate an concrete implementation of the AlexaBaseHandler and delegate to the process_request method.

requirements.txt

This file is the standard Python requirements file. This file is used by the create_deployment.py script to install the necessary 3rd party libraries that your Alexa skill might need. Any library specified in the requirements.txt file will be installed into your deployment directory.

create_aws_lambda.py

This script creates a zip file per the Amazon lambda specification, such that it is suitable to upload as your lambda function implementation.

activate your virtualenv and execute like:

create_aws_lambda.py -r <rootdir> -i "list,of,all,python,files,to,include"

create_aws_main.py

This script creates a template main entry point

All deployments are stored in the deployments subdirectory and follow the naming convention of ‘deployment_n’ and ‘deployment_n.zip’, where ‘n’ is automatically calculated to the next largest ‘n’ in the directory. Right now it does this based on the name of the subdirectories of deployments - NOT - the names of the zip files.

The deployment script will create a deployment directory and zip file for everything in the requirements.txt file AND the files in the deployment_files variable in the create_deployment.py file.

When this script is done running, there should be a ‘deployment_n.zip’ file in the deployments directory. It is that file that needs to be upload to the Amazon Lambda console.

activate your virutal env and execute like:

create_aws_main.py

create_alexa_handler.py

This script creates a template concrete handler class.

This template can be used as the starting point to create the necessary implementation details for the handler.

activate your virtualenv and execute like:

create_alexa_handler.py

create_alexa_test_skills.py

This script creates a template utterance and intent schema.

This template can be used as the starting point to create the necessary implementation details for an actual utterance and intent schema.

activate your virtualenv and execute like:

create_alexa_test_skills.py
Release History

Release History

0.2.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.10

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.9

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.7

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.9

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.8

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.7

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyalexa-skill-0.2.0.tar.gz (16.7 kB) Copy SHA256 Checksum SHA256 Source Oct 11, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting