Skip to main content

Dialogflow API support for Python

Project description

PyDialogflow for HTTPS server

© 2018 SiLeader.

features

  • PyAlexa (pyalexa-lambda) like syntax
  • simple system

usage

use Flask

from flask import Flask, request, jsonify
import dialow


app = Flask(__name__)


# Alexa like syntax
@app.route("/dialogflow/endpoint", methods=["POST"])
def dialogflow_endpoint():
    req = dialow.Request(request.json)

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

License

Apache License 2.0

See LICENSE

for Alexa

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

pydialogflow-1.0.0.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

pydialogflow-1.0.0-py3-none-any.whl (3.3 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