Live data from Hacker News

Ask HN: What stack do you use to build a REST API?

news.ycombinator.com

21–30 of 31 posts

Re: Ask HN: What stack do you use to build a REST API?

#21
post #10

Depends on the project needs. Past choices have been Django, Rails, Flask, Sinatra, Codeigniter, C#, Go, and Java. Every system is different. You shouldn't try to fix every problem with the same tool. :)

I've always been under the impression that Django/Flask and Rails/Sinatra were more or less the same things but with different languages?

Re: Ask HN: What stack do you use to build a REST API?

#24
post #20
post #17

Flask + postgres

Out of interest, I hear a lot of people saying Flask is good for REST API's. You don't use any additional framework? Does this mean you manually have to code POST requests to accept data / save them to the database? Some kind of REST framework would seem like a far easier option. (I use Django / Tasypie - you configure the resource, and it automatically knows how to save a valid POST to the database).

Yeap, i don't know if flask has some lib to magically expose ORM objects via CRUD services, but i generally don't like those ( orm is already the limit to my tolerance for auto generated code). But it's not a big deal. With some base class and python getattr / setattr, you can factor out much of the code.

In general, the whole point of using microframework like flask is to keep a tight control of your code base. You may think that some low level libs would be too hard to code, and you would be right, but most of time you can avoid the difficulties by coding only for your specific case.

Re: Ask HN: What stack do you use to build a REST API?

#27
post #21
post #10

Depends on the project needs. Past choices have been Django, Rails, Flask, Sinatra, Codeigniter, C#, Go, and Java. Every system is different. You shouldn't try to fix every problem with the same tool. :)

I've always been under the impression that Django/Flask and Rails/Sinatra were more or less the same things but with different languages?

They may be used to achieve similar results, but follow different paths. Each framework has a different philosophy and functionality out of the box, which may be adjusted to the needs of the project.

Re: Ask HN: What stack do you use to build a REST API?

#28
Before, I use Scala + Finagle. Right now, I really like using Flask for my REST APIs. It's so lightweight and easy to set up.

I still use Scala though for data / computation intensive code. The setup is REST API with Flask, add to queue to be dequeue by the Scala worker. I really like the combination.

Post reply on HN