3 ms·
If you are keen on learning something new then I definitely recommend looking into Go. It will be time well-spent, and you can use the minimal Gorilla web toolk
by amirmansour 12y ago
If you are keen on learning something new then I definitely recommend looking into Go. It will be time well-spent, and you can use the minimal Gorilla web toolkit (http://www.gorillatoolkit.org http://www.gorillatoolkit.org). It's a toolkit and not a framework, so you can just use the parts that you need, and that's nice way of staying "lightweight."
With that said, I wouldn't brush off Python as a possible choice. Here are some small/lightweight Python web frameworks in addition to Flask (http://flask.pocoo.org http://flask.pocoo.org):
1. Bottle (http://bottlepy.org http://bottlepy.org). It's a one file module and has no dependencies.
2. Web.py (http://webpy.org http://webpy.org). The "anti-framework." Very simple.
3. CherryPy (http://www.cherrypy.org http://www.cherrypy.org). Another minimal framework that comes with its own WSGI server.
All the frameworks mentioned above are stable, mature, and used in production.
With that said, any good API these days needs authentication, authorization, and rate-limiting. To get these standard things done from the start you should look at fantastic Django Rest Framework (at least don't ignore it). If you do use Django, then you can also use Haystack (http://haystacksearch.org http://haystacksearch.org) to easily work with Elasticsearch.
It's hard to give detailed suggestions without knowing the application you are trying to build, but I hope you find this helpful.
- dustinfarris 12y agoThanks for the answer, and thanks for the links. I gave DRF+Haystack serious consideration already—in fact, I built a prototype using these packages. The reason I do not want to move forward with them is that they make the assumption that you will be using Django's ORM and some sort of SQL store for persistence with Elasticsearch bolted on top. My intention is to use Elasticsearch exclusively. I also want to use the API with Ember.js, which is difficult given the differing JSON format opinions between DRF and Ember.js (see ember-django-adapter[1]). I've also noticed that Haystack's owner has been inactive recently which concerns me. This in itself gave me a reason to check out Elasticsearch's own Python bindings[2] which aren't that scary after all. I am looking at Gorilla web toolkit (thanks for the link!). [1]: https://github.com/dustinfarris/ember-django-adapter https://github.com/dustinfarris/ember-django-adapter [2]: https://github.com/elasticsearch/elasticsearch-py https://github.com/elasticsearch/elasticsearch-py