Skip to content
Python API for writing new Amazon Echo skills
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Simple Python API for granting custom skills to the Amazon Echo (Alexa)


pyalexa uses flask-style decorators to mark functions that handle a particular intent.


Declaring a skill

To declare a skill, you will need your Amazon app ID, something like Then, just create a Skill object:

from pyalexa import Skill

skill = Skill(app_id='',

Intents are handled using decorators, in the style of the popular flask library. There are three decorators provided: launch, for the LaunchRequest, end for SessionEndedRequest, and intent for [IntentRequest]s. Here's a pyalexa version of HelloWorld, from Amazon's sample skills.

from pyalexa import Skill, Card

skill = Skill(app_id='')

def launch(request):
    return request.response(
        speech="Welcome to pyalexa, you can say hello",
        reprompt="You can say hello"

def end(request):
    print("We can do cleanup stuff here")

def hello_world(request):
    return request.response(
        card=Card("Greeter", "Hello World!")
        speech="Hello world!"

def help_intent(request):
    return request.response(
        text="You can say hello to me!",
        reprompt="You can say hello to me!"
You can’t perform that action at this time.