Live data from Hacker News

Flask API – Browsable Web APIs for Flask

flaskapi.org

41–50 of 50 posts

Re: Flask API – Browsable Web APIs for Flask

#42
post #2

Why use this and not Flask-RESTful? How is the use case different? http://flask-restful.readthedocs.org/en/latest/

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…

The 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.

Re: Flask API – Browsable Web APIs for Flask

#44
post #17

I spent last 3 months building AngularJS + Flask where the client talks to server only through REST. There were 3 options: 1. Bare Flask 2. Flask RESTful 3. Flask Restless I've spent quite some time investigating 2nd and 3rd options. Problems with 2nd: a) Didn't bring much to the table comparing to pure Flask. Extra abstraction and complexity that without much improvements b) Swallowing Flask exceptions c) Risk that…

You should check out eve ( http://python-eve.org ) - it's amazing for rapid prototyping (if the fact it requires Mongo isn't an issue). I'm building an AngularJS + REST server using Eve for the server. It has saved me so much time that I'm putting my dev effort mainly into a comprehensive test suite because there's so little dev work to do (btw - I'm not the author, it's just the fastest framework I've found for deve…

it seems is pretty much the same as Sails in Node world

Re: Flask API – Browsable Web APIs for Flask

#47

Went to the site hoping to learn what Flask is, but they don't even link to it anywhere. Doing a Google search for "flask" just returns a bunch of drinking flasks, and flask.com is for buying flasks as well. So great, what is Flask? What is this about?

The main site is at: http://flask.pocoo.org/

Flask is a web framework for Python. It's smaller and lighter than Django, and can be picked up very quickly. Basically, the author of this library has a well-liked REST framework for Django, and folks are excitedg to see this goodness being brought over for Flask.

Re: Flask API – Browsable Web APIs for Flask

#48
post #39
post #22

Earlier quoted context omitted.

Perhaps an obvious question, but why do APIs need to be browsable?

If you are still asking yourself that question, I strongly recommend you read this book: http://restfulwebapis.com/

It'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?

Re: Flask API – Browsable Web APIs for Flask

#49
post #48
post #39

Earlier quoted context omitted.

If you are still asking yourself that question, I strongly recommend you read this book: http://restfulwebapis.com/

It'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?

That's in the contents of the book.

Re: Flask API – Browsable Web APIs for Flask

#50
post #17

I spent last 3 months building AngularJS + Flask where the client talks to server only through REST. There were 3 options: 1. Bare Flask 2. Flask RESTful 3. Flask Restless I've spent quite some time investigating 2nd and 3rd options. Problems with 2nd: a) Didn't bring much to the table comparing to pure Flask. Extra abstraction and complexity that without much improvements b) Swallowing Flask exceptions c) Risk that…

You should check out eve ( http://python-eve.org ) - it's amazing for rapid prototyping (if the fact it requires Mongo isn't an issue). I'm building an AngularJS + REST server using Eve for the server. It has saved me so much time that I'm putting my dev effort mainly into a comprehensive test suite because there's so little dev work to do (btw - I'm not the author, it's just the fastest framework I've found for deve…

I'm considering also Sandman https://github.com/jeffknupp/sandman

wondering how Eve stacks up to that. Sandman you just connect it to the DB and it's supposed to give you a REST api

Post reply on HN