Skip to content

Library to interact between AWS Lex or Alexa using AWS Lambda as background.

License

Notifications You must be signed in to change notification settings

dmmop/awsLexAlexa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Library to interact between AWS Lex or Alexa using AWS Lambda as background.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published