7 ms·
Flask-Potion: REST framework for Flask, now supports Peewee
- rurban 11y agoNot nice. potion is _why the lucky stiff's VM. http://perl11.org/potion/ http://perl11.org/potion/
- agumonkey 11y agoIm not versed enough to compare it with Flask Restful and Restless, anyone care to pitch in ?
- kolanos 11y agoI've tried all three. They're very different. Flask-Restful is really a toolkit to build a REST API, it leaves much of the heavy lifting to you. If you want your REST API to map your models, Flask-Restful expects you to implement that yourself on top of it. Flask-Restless allows you to quickly build a REST API using SQLAlchemy models. But I found it's design limiting. If you want to change the way your REST API behaves you have to rely heavily on pre-processor and post-processor hooks. What I like about Flask-Potion is that it resolves the design problems I had with Flask-Restless by leveraging meta classes and a declarative approach for resources. You can also create relationships between resources much like you would a SQLAlchemy model. Flask-Potion also is self-documenting and follows the JSON Hyper-Media spec [0]. 0: http://json-schema.org/latest/json-schema-hypermedia.html http://json-schema.org/latest/json-schema-hypermedia.html Flask-Potion probably has more in common with the Django REST framework than the two projects mentioned here. Full disclosure: I'm a contributor to the project.
- agumonkey 11y agoThanks a lot, I understand and appreciate better the project.
- eevilspock 11y agoEveryone seems to agree that Flask is great for APIs and Rest. But am I still better off with Django for user apps? I'm attracted to the simplicity and transparency of Flask, but I also want to be efficient, as well as attract open source contributors. It's been difficult to get an objective and practical amswer to this question. Also troubling is that the creator of Flask seems to want to hand Flask over to someone else, is unhappy with Python 3 to the point he seems to be ditching Python for Rust: http://lucumr.pocoo.org/2014/7/3/growing-flask/ http://lucumr.pocoo.org/2014/7/3/growing-flask/ http://lucumr.pocoo.org/2013/11/28/emotional-programming/ http://lucumr.pocoo.org/2013/11/28/emotional-programming/ http://lucumr.pocoo.org/tags/rust/ http://lucumr.pocoo.org/tags/rust/
- eugenekolo2 11y agoWhere do you see him "unhappy with Python 3 to the point he seems to be ditching Python"? I only see him saying he can't use Python 3 at work. That's fairly common and frustrating, but it's not unhappiness in Python 3.
- eevilspock 11y agoSorry, I had meant to post this link: http://lucumr.pocoo.org/2013/11/28/emotional-programming/ http://lucumr.pocoo.org/2013/11/28/emotional-programming/ But you're right. He hasn't said he's ditching Python. It was more me reading between the lines. http://lucumr.pocoo.org/2014/10/1/a-fresh-look-at-rust/ http://lucumr.pocoo.org/2014/10/1/a-fresh-look-at-rust/