I want to write a simple API to interface directly with Elasticsearch, almost to the point of being a proxy. I have extensive Python/Django experience, but I'm open to learning something new. Since this is pretty much going to be a CRUD API with some authentication logic, Django feels like overkill. I'm looking at learning Flask, or perhaps something non-Python. Any suggestions?
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 (<a href="http://www.gorillatoolkit.org" rel="nofollow">http://www.gorillatoolkit.org</a>). 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."<p>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 (<a href="http://flask.pocoo.org" rel="nofollow">http://flask.pocoo.org</a>):<p>1. Bottle (<a href="http://bottlepy.org" rel="nofollow">http://bottlepy.org</a>). It's a one file module and has no dependencies.<p>2. Web.py (<a href="http://webpy.org" rel="nofollow">http://webpy.org</a>). The "anti-framework." Very simple.<p>3. CherryPy (<a href="http://www.cherrypy.org" rel="nofollow">http://www.cherrypy.org</a>). Another minimal framework that comes with its own WSGI server.<p>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 (<a href="http://haystacksearch.org" rel="nofollow">http://haystacksearch.org</a>) to easily work with Elasticsearch.<p>It's hard to give detailed suggestions without knowing the application you are trying to build, but I hope you find this helpful.
I haven't used Flask (or Python) aside from one small hack project. It seemed simple and straight forward enough, and very similar to Ruby's Sinatra framework. Personally in Ruby I would most likely pick Sinatra, in Python I'd pick Flash or something similar.<p>However if you wanna play with languages you're less familiar with, I'd recommend Go, or Node.js.<p>Personally I find Go really interesting as it's quite different from the languages I normally work in, and it's concurrency model makes it performant without being a mindfuck.<p>Node.js is interesting as it's Javascript, but extremely I/O performant due to it's evented nature, but that also makes concurrency a bit of a mindfuck at times.<p>Those are my suggestions at least if you're itching to get your toes wet in some new fun languages :)
You probably know about django-rest-framework, which I find to be absolutely awesome. I wouldn't look further --- sooo much batteries the API will practically write itself ;)
I would suggest node.js - it makes it really easy to not shoot yourself in the foot. The async nature allows for concurrency, something you can't easily archieve with e.g. ruby and python. And while you are at it, try out hapi.js: <a href="http://hapijs.com/" rel="nofollow">http://hapijs.com/</a> - my favorite tool for writing request proxies (which i do for a living :D )
Do it in Python with django rest or flask or whatever. You have experience on it.<p>When you have it nailed, try to do it in something else!<p>I have no experience with it, but what about elixir-lang.org? Everyone try GO or Node. Be more brave and be more niche!<p>Also, I'm learning a bit of F#. Is so crazy, and is .NET. So, how about be against the trends :)
If you feel like having a look at Perl, give this a try: <a href="https://metacpan.org/pod/Web::Simple" rel="nofollow">https://metacpan.org/pod/Web::Simple</a><p>If nothing else you'll be introduced to a lot of programming concepts you'd otherwise be unlikely to see.
I'd recommend Flask-Restful <a href="https://github.com/twilio/flask-restful" rel="nofollow">https://github.com/twilio/flask-restful</a>
I've recently used in an API project involving Elasticsearch.
If you feel like using golang. I have written this and been using this in production for quite some time <a href="https://github.com/Simversity/gottp" rel="nofollow">https://github.com/Simversity/gottp</a>
Maybe this might help:<p><a href="http://python-eve.org/" rel="nofollow">http://python-eve.org/</a><p>It is written on top of Flask and includes some batteries.<p>Could get a simple API up in 2 hours.
Check out luvit:<p><a href="https://luvit.io/" rel="nofollow">https://luvit.io/</a><p>Learn a little Lua along the way. Really great stuff!