开发者

Persistent user profile on GAE

开发者 https://www.devze.com 2023-04-10 19:13 出处:网络
I am building a GAE application with flask and gae-sessions (built-in flask sessions are just so confusing to work with).

I am building a GAE application with flask and gae-sessions (built-in flask sessions are just so confusing to work with).

What's the best way to add persistent profiles?

I'm currently extending gaesessions.Session to add 开发者_运维知识库@werkzeug.cached_property profile. This way profile is loaded lazily and persisted after each request. It works but seems like I'm reinventing the wheel. Any existing libraries or frameworks already do anything similar?


Builtin flask sessions works with a cookie it's should be ok if you don't plan to store a lot of data.

GAE Session is usable as is you shouldn't have to add anything for it to work, its handled by the underlying framework.


Flask-Security is probably the most mature library to do that, and is under active development at the moment of writing.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号