Skip to content
No description, website, or topics provided.
Python Makefile
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
alexa_skill_boilerplate
docs
tests
.editorconfig
.gitignore
.travis.yml
AUTHORS.rst
CONTRIBUTING.rst
HISTORY.rst
LICENSE
MANIFEST.in
Makefile
README.rst
requirements_dev.txt
setup.cfg
setup.py
tox.ini

README.rst

Alexa Skill Boilerplate

Documentation Status

Provides a base class that helps developer to focus on developing alexa skills

Example

.. codeblock:: python

    # encoding: utf-8
    import os
    import sys
    from base import Skill


    # --------------- Helpers that build all of the responses ----------------------

    class HelloWorldSkill(Skill):
        card_title = "Hello World"
        welcome_speech = """Welcome to the Alexa Skills for Hello World."""
        welcome_reprompt_text = 'You can say search food in Auckland'

        def hello_world(self, intent, session):
            """Intent Handler"""

            # slot_value = intent['slots']['slot_name']

            should_end_session = False
            session_attributes = {}
            speech_output = "Hellow World!"
            reprompt_text = None

            # Setting reprompt_text to None signifies that we do not want to reprompt
            # the user. If the user does not respond or says something that is not
            # understood, the session will end.
            return self.build_response(session_attributes, self.build_speechlet_response(
                intent['name'], speech_output, reprompt_text, should_end_session)


        @property
        def intent_handlers(self):
            handlers = super(SearchSkill, self).intent_handlers
            handlers.update({
                'HelloWorld': self.hello_world,  # adding the intent handler
            })
            return handlers

    # AWS Lambda Handler
    def handler(event, context):
        return HellowWorldSkill().lambda_handler(event, context)


Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

You can’t perform that action at this time.