Skip to main content

Alexa API support for Python on AWS lambda

Project description

PyAlexa for AWS lambda and HTTPS server

© 2018 SiLeader.

usage

use AWS Lambda

import alexa


def lambda_handler(data, _):
    request = alexa.Request(data)

    if request.type == "IntentRequest":
        response = alexa.Response()
        response.output_speech(text="Alexa Test")
        return response.response

use Flask

from flask import Flask, request, jsonify
import alexa


app = Flask(__name__)


@app.route("/alexa/endpoint", methods=["POST"])
def alexa_endpoint():
    req = alexa.Request(request.json)

    if request.type == "IntentRequest":
        res = alexa.Response()
        res.output_speech(text="Alexa Test")
        return jsonify(res.response)

License

Apache License 2.0

See LICENSE

for Dialogflow

GitHub

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyalexa-lambda-1.0.4.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

pyalexa_lambda-1.0.4-py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page