3 ms·
The most obvious feature difference is the browsable API. Flask API also shares the same architecture as the core of Django REST framework, which I think just
by tomchristie 13y ago
The most obvious feature difference is the browsable API.
Flask API also shares the same architecture as the core of Django REST framework, which I think just has a really nice separation of concerns.
Also the interface of `request.data` means is easy to transparently support both JSON and form requests, and the nice content negotiation on responses means it's easy to build services that power both an HTML front-end and an API from the same endpoints.
Right now Flask RESTful is more mature of course, but I've got high hopes for this, and it's been super fun to build so far.
- pmdarrow 13y agoWe've been considering "porting" our app from Flask-RESTful to Django REST Framework because it is so well architected, tested, and has a large community around it. So I'm overjoyed to hear that you're bringing this awesomeness to the Flask world Tom!
- tomchristie 13y agoMost welcome! For anyone on this thread who's interested in contributing I'd suggest opening a ticket citing your interest, so that we've then go a place we can start the discussion from.
- rajbala 13y agoPerhaps an obvious question, but why do APIs need to be browsable?
- tomchristie 13y agoThey don't need too, but it sure-as-hell improves accessibility & usability.
- jvehent 13y agoIf you are still asking yourself that question, I strongly recommend you read this book: http://restfulwebapis.com/ http://restfulwebapis.com/
- rajbala 13y agoIt's a legitimate question. I understand why URLs need to be browsable. How does a browsable API work when it may need certain HTTP headers, request signatures, etc?
- steveklabnik 13y agoThat's in the contents of the book.
- mwhite 13y agoWhat about using Swagger[0] with flask-restful-swagger[1]? [0] https://helloreverb.com/developers/swagger https://helloreverb.com/developers/swagger [1] https://github.com/rantav/flask-restful-swagger https://github.com/rantav/flask-restful-swagger
- frio 13y agoThe only reason I still use Django is my deep-seated and abiding love for django-rest-framework. If you're bringing it to Flask, then that's the final bullet.