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

John Wheeler jwheeler1 at gmail.com
Thu May 12 12:26:50 EDT 2016


David,

Whoa! Thank you man! We're on the same page with a lot of these. I'm going
to check out the cryptography module. I hadn't heard of it, but I want to
see it.

The docstrings / autodoc are a priority. This is my first time using
Sphinx, and I prioritized shipping *something* with minimal docs, but now
I'm switching gears and working on a tutorial / more comprehensive docs.

If was pulling the library down, and I saw the PyYAML dependency, it would
cause me to pause. What's important to me now is showcasing the feature of
grouping templates in a single file vs per file templates. At first, I
started rolling my own system sort of based on Lektor content files but
then decided to grab YAML off the shelf because I couldn't think of any
hard reasons aside from the dependency not to. But I don't like the
dependency and also want to work toward removing it.

For the timestamp verification, your clock needs to sync with the NTP, so I
did this to lower barriers to entry. The security concern didn't escape me
either though. What would your thoughts be on turning timestamp (any, all)
verification off when app.debug = True?

I'll investigate blueprints further--I have not looked at them much. Other
APIs that reserve a default URL put an underscore in front to mitigate
against clobbering. A lot of Google App Engine APIs work like that. I don't
think it's ideal, but don't know if shifting over to a blueprint is worth
it. Excuse my ignorance on blueprints for the time-being.

Where are those tests, David? :-) In all seriousness, they are something
that I need and want to do, but have back burnered for now in favor
developing against the samples (which have been ported from the official
Amazon Java skills kit).

Thank you again David, hope to hear more from you.

John

On Thu, May 12, 2016 at 8:35 AM, David Baumgold <david at davidbaumgold.com>
wrote:

> Oh, one more very important thing: where are the automated tests?!
>
> On May 12, 2016 at 11:29:49 AM, David Baumgold (david at davidbaumgold.com)
> wrote:
>
> 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/300f3e74/attachment-0001.html>


More information about the Flask mailing list