anjishnu / ask-alexa-pykit

A minimalist SDK for developing skills for the Amazon Echo's ASK - Alexa Skills Kit using Amazon Web Services's Python Lambda Functions. Currently supported profiles are for Linux servers and AWS Lambda. Check the appropriate release branch. The cherrypy release branches have added components for request validation.
MIT License
275 stars 58 forks source link

Handling session attributes #7

Closed JoeGermuska closed 8 years ago

JoeGermuska commented 8 years ago

I'm still pretty new to Alexa development, but I find the session management kind of weird. It seems as though you have to make a point to send back session attributes every time, which is counter to web programming models where you can trust the framework to manage that.

If you and other people using this code are interested, I'd like to talk about a good approach to handling it, and I'm happy to implement it and/or test it since session management seems likely to be part of what I need.

It would be easy enough to expose what comes in as request['session']['attributes'] as something like request.session and just use it as a dictionary. But then in the current model, you'd need to remember to pass it to create_response -- some design which protected against forgetting to make that explicit seems worth looking for.

anjishnu commented 8 years ago

I think I understand what you are doing here (Took a look at your dev branch on your fork). Makes perfect sense.

anjishnu commented 8 years ago

Note, I'd suggest merging that change in quickly because I have a relatively large rework on the dev branch - which might change the name of the 'utils' file in the ask module.