Rogo Speaker Application Kits for Python
Flask-Rak is a
Flask extension that makes building Rogo applications for the Rogo Speaker easier and much more fun.
This project is heavily inspired and based on John Wheeler's Flask-ask for the Alexa Skills Kit.
A Flask-Rak application looks like:
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import Blueprint, jsonify api = Blueprint('api', __name__) from flask_rak import RAK, statement, question APP_NAME = 'weather' weather_app = RAK( app_name=APP_NAME, app=api, route='/weather' ) @weather_app.launch def launch(data): ''' data: Type _Field ''' print 'launch: ', data return statement(APP_NAME, "helllo")
In the code above:
Rakobject is created by passing in the Flask application and a route to forward Rogo speaker requests to.
HelloIntentto a view function
- The intent's
firstnameslot is implicitly mapped to
To install Flask-Rak
pip install flask-ask
To install from your local clone or fork of the project, run:
python setup.py install
Update pip package:
update new pip package to https://pypi.org/
python setup.py sdist twine upload dist/*