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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file pyalexa-lambda-1.0.4.tar.gz.

File metadata

  • Download URL: pyalexa-lambda-1.0.4.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

File hashes

Hashes for pyalexa-lambda-1.0.4.tar.gz
Algorithm Hash digest
SHA256 4dcc67f0887dab0d2b267e2b4de231fdb3595c45851f718fa8b323ddf81f2aad
MD5 a3266b8b3fdad831b1180d148b424345
BLAKE2b-256 b71ac871c0ffd2c325c363c578a0bfee20ec902557215d2b5af2871725c3733d

See more details on using hashes here.

File details

Details for the file pyalexa_lambda-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: pyalexa_lambda-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

File hashes

Hashes for pyalexa_lambda-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 12056979bb06455c33299daed137af73669f45063a5da621a6e18fb6d03e9073
MD5 30f48d76b3c9097e7724bd35e33a4732
BLAKE2b-256 20061193e2ce989d5da3fe47490a84e45ce463da2917cd7f86765c47d13ff570

See more details on using hashes here.

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