Hacker News new | ask | show | jobs
by jamornh 3665 days ago
I was just looking for something like this, and as of yesterday I only found this project: https://github.com/anjishnu/ask-alexa-pykit

Yours look much simpler to get started, would you care to comment on what the differences are between yours and the project I just posted?

1 comments

Yes!

I just put mine up a month ago - not discoverable for "Python Alexa" or any keywords. Working on it :-)

So for the differences -

Alexa Skills are deployable as AWS Lambda functions or behind HTTPS. Currently, ask-alexa-pykit works on Lambda and Flask-Ask implements the signature verification required for HTTPS deployments. (i.e. Flask-Ask works on your own HTTPS server or Lambda).

Another difference is in the intent mapping design. Flask-Ask is based on the same architectural patterns of Flask with context locals, parameter mapping / conversion, and of course, Jinja templates!

For example, Mapping an intent with ask-alexa-pykit looks like this:

http://pastebin.com/raw/hQJLKnHL

Flask-Ask is like this:

http://pastebin.com/raw/9fWrGNYY

Flask-Ask also converts slots like firstname from the example above into arbitrary datatypes, and has stock conversions for AMAZON.DURATION (e.g. 'P2YT3H10M' into a Python datetime.timedelta). Full parameter mapping docs here: https://johnwheeler.org/flask-ask/requests.html#mapping-inte...

Flask-Ask templates are grouped together in the same files since utterances are typically small phrases--to make them easier to manage. Templates are of course an optional feature but are encouraged!

It's still very early, but I'm working my butt off, full-time on it! I have a 5-min tutorial that shows how to get up and running with Flask-Ask and ngrok: https://www.youtube.com/watch?v=eC2zi4WIFX0 - The API has changed a little, if you try it out and have any questions, you can do an issue or hit me up! john at ! johnwheeler.org

Thank you!

Thanks for the detailed reply! I've been interested in the echo and wanted to get into it for a while so I'll definitely dig into flask-ask and try to get up and running with it.
That video was great! Just started thinking about Alexa, this looks like an easy way to get moving with it.
Thank you!