[Flask] Flask-Ask a Flask Extension for Writing Amazon Echo Apps with Alexa Skills Kit

David Baumgold david at davidbaumgold.com
Thu May 12 11:29:45 EDT 2016


Hey John, this looks nifty! However, I have a few comments for how it can be improved:

* You should use the “cryptography” module instead of PyOpenSSL: https://cryptography.io
* None of your classes or methods have docstrings! I suggest writing docstrings, and using Sphinx’s autodoc extension to render those docstrings in your documentation: http://www.sphinx-doc.org/en/stable/ext/autodoc.html 
* What if I don’t want to use YAML? I suggest removing that dependency, and exposing an API to fetch a template. That way, the developer can put multiple templates in one YAML file the way you have it set up, but it’s not required, and if the developer doesn’t use YAML then it won’t be pulled in as a dependency.
* ASK_VERIFY_TIMESTAMP is set to False by default, but it’s generally good practice to make code secure by default. That way, a developer can intentionally and knowingly change the defaults to be insecure for development purposes, but is less likely to leave them insecure in production.
* Rather than setting a default ASK_ROUTE setting, why not construct this as a Flask Blueprint, so the developer can attach it to whatever URL he/she wants?

Let me know if you’d like me to clarify some of these points. In spite of my comments, I think this is a really nifty idea, and I might want to try using it sometime!

David Baumgold

On May 12, 2016 at 11:12:41 AM, John Wheeler (jwheeler1 at gmail.com) wrote:

Hello everybody out there,

I've been working on a Flask extension, called Flask-Ask, for programming Alexa skills on the Amazon Echo. I've been working on this for a few weeks now and have a release pushed up to pypi, samples, and documentation.

The Alexa service is based on its own request / response model that uses JSON over HTTP. I made Flask-Ask's API similar to Flask's in that regard with routing / parameter mapping, context locals, and integration with Flask's template system.

The code and samples are available at

https://github.com/johnwheeler/flask-ask

The documentation is here

http://flask-ask.readthedocs.io/en/latest/

I'd like to know what people think of the API and what features they want. I'm working on a tutorial that shows how to rapidly develop skills with Flask-Ask and ngrok.io, and I'm available for a Google Hangout if you want to try and need help in the interim.

John
_______________________________________________  
Flask mailing list  
Flask at python.org  
https://mail.python.org/mailman/listinfo/flask  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20160512/6d52e6f9/attachment.html>


More information about the Flask mailing list