Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

No project description provided

Project description

AwsLexAlexa Generic badge

This library may wrap the internal logistic between Amazon Lex or Alexa (Amazon echo) using AWS Lambda as background serverless.

You can see the implementation in lambda_function.py.

Install

pip install AwsLexAlexa -t .

Usage:

from awsLexAlexa.event_handler import EventHandler, LEX, ALEXA

ev = EventHandler()

# Get logger with UserId included in log message: 
logger = ev.get_configured_logger("mi_app_name")

@ev.handler_intent(intent='intent-name')
def foo(event):
    # TODO: Implement logic required
    return event.delegate_response()

@ev.default_intent()
def default(event):
    # TODO: Implement logic required
    # Other intents which function have not be specified
    return event.delegate_response()

...
...

def lambda_handler(event, context):
    logger.debug('Request:\n {}'.format(event))
    action = ev.execute(event)
    logger.debug('Response:\n {}'.format(action))
    return action

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
awsLexAlexa-0.7.tar.gz (7.2 kB) Copy SHA256 hash SHA256 Source None Sep 18, 2018

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