3 ms·
Im not versed enough to compare it with Flask Restful and Restless, anyone care to pitch in ?
by agumonkey 11y ago
Im 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.