7 ms·
This is a short list I have compiled a few months ago, FWIW: New kids on the block: - Starlette https://www.starlette.io - Vibora https://vibora.io
by BerislavLopac 7y ago
This is a short list I have compiled a few months ago, FWIW:
New kids on the block:
- Starlette https://www.starlette.io
- Vibora https://vibora.io
- Xweb https://github.com/gaojiuli/xweb
- Storm https://github.com/jiajunhuang/storm
- Responder http://python-responder.org
- Quart https://pgjones.gitlab.io/quart/
- Sanic https://sanic.readthedocs.io
- Bocadillo https://bocadilloproject.github.io/
- Japronto https://github.com/squeaky-pl/japronto
The old guard:
- Flask http://flask.pocoo.org
- Tornado http://www.tornadoweb.org
- Falcon https://falconframework.org/
- Bottle https://bottlepy.org
- Pyramid https://trypyramid.com/
- CherryPy https://cherrypy.org/
Less known older ones:
- Wheezy Web https://pythonhosted.org/wheezy.web/
- API Hour https://pythonhosted.org/api_hour/
- Morepath https://morepath.readthedocs.io/en/latest/toc.html
- Klein https://github.com/twisted/klein
- Weppy http://weppy.org/
- sitkack 7y agoAny of those have good Swagger integration? https://swagger.io/ https://swagger.io/
- BerislavLopac 7y agoFunny you should ask: https://github.com/berislavlopac/pyotr https://github.com/berislavlopac/pyotr ;)
- hmcdona1 7y agoFastAPI (built on Starlette) essentially generates your OpenAPI docs for free via intuitive use of decorators and type hints/Pydantic models.
- galacticdessert 7y ago+1 for FastAPI. It also has really good documentation
- mhd 7y agoGood howto/tutorial documentation, I had some problems with the reference stuff. For example, finding the places where you have to put some info (attributes, annotations, docstrings) so that it appears in the generated swagger docs (really needed if you want to publish them for external customers).
- ergo14 7y agohttps://github.com/Pylons/pyramid_openapi3 https://github.com/Pylons/pyramid_openapi3 https://github.com/ergo/pyramid_apispec https://github.com/ergo/pyramid_apispec I'm pretty sure all other popular frameworks have integrations too.
- zbentley 7y agoIt is extremely easy to integrate Django (well, DRF) with Swagger: https://django-rest-swagger.readthedocs.io/en/latest/ https://django-rest-swagger.readthedocs.io/en/latest/
- phalangion 7y agoDjango is a pretty big omission from your list.
- BerislavLopac 7y agoGood point. I was specifically looking for "base-level" frameworks that focus on routing and responses (so are well-suited for API development) rather than full-stack solutions (e.g. FastAPI isn't there either). Just copy/pasted that from my notes -- as I said, FWIW.
- dragonsh 7y agoI still think WSGI is the main reason for so many frameworks in Python. So probably it will be nice to divide framework or libraries in WSGI and ASGI.
- randomsearch 7y agoDjango’s REST library is incredible. Steep learning curve compared to flask etc, but truly an industrial strength library that is brilliantly designed.
- mkolodny 7y agoEspecially considering Django powers Instagram and Pinterest's backends. At some point, Python's creator Guido van Rossum also said "My personal favorite -- and I expect that that will remain a personal favorite for a long time -- is something named Django. ... I highly recommend it." Personally, I use Django with REST Framework (https://www.django-rest-framework.org https://www.django-rest-framework.org). I've enjoyed using it tremendously for the past few years. One important feature Django lacks right now is asyncio support. There are plans to add it though (https://groups.google.com/forum/#!topic/django-developers/Kw7-xV6TrSM https://groups.google.com/forum/#!topic/django-developers/Kw...). Hopefully that happens soon.
- xz0r 7y ago> One important feature Django lacks right now is asyncio support. Have you looked at Django-channels?
- macintux 7y agoZope is probably the granddaddy of them all. Tried and failed miserably to use it 20 years ago.
- dec0dedab0de 7y agoI saw that gnu.org was using plone, and I couldnt get it working about 15 years ago. But I didn't know python at all then.
- stevesimmons 7y agoZope was my way into Python, way back in 2000. Brilliant concept, but hard to use well.
- randallsquared 7y agoThe framework I got into Python with was [Webware for Python](https://cito.github.io/w4py/ https://cito.github.io/w4py/), written in reaction to Zope.
- rbanffy 7y agoZope 2 was so ahead of the market when it appeared I had trouble explaining my clients it didn't need a SQL database to persist the data. I wish it had gotten more attention and care in the past decade.
- stephenSinniah 7y agoIs there any python framework that optimizes for developer productivity?
- odonnellryan 7y agoFlask is pretty good. Stays out of your way and does what a framework must, and has some extras for forms etc.. if you want to use them. Tornado is fun to use, but less resources and libraries.
- dragonsh 7y agoI started working with Django when it was pre 1.0 (0.96), as it was explicit in nature compared to Ruby on rails in 2003-4. Subsequently I tried flask and recently async framework. Our team still use flask just for one reason, it's a thin layer over wsgi making it easier and once application or service grows it can disappear completely. So it has right level of abstraction making it between a library and framework and you can use it either as library or framework. The difference is "framwwork calls your code" and "your code calls library code". I like the second paradigm more. In order to make job very easy to develop there are excellent libraries so I have used flask, sqlalchemy (direct no flasl-sqlalchemy), alembic, marshmallow, celery, machine learning libraries (sci-kit, tensorflow, keras) and few more. For development use cherrypy to graft wsgi app and for production use gunicorn or uwsgi. Our team is extremely happy and our test coverage is 98% as we use code as libraries not asnframework, so it makes it easy to test rest API and celery task code. Also when needed for performance (not often as most libraries are better tested and designed), did take away the library abstraction and write our own code.
- odonnellryan 7y agoI traditionally like using the libraries not the Flask integrations (as in your sqlalchemy example) however I do find myself using Flask Admin and Flask-WTForms, since while they do have downsides and you have to commit to using them, they do a lot for you. I haven't checked out CherryPy, I should next hobby project. Gunicorn is awesome, uWSGI is also good and feels more "production" to me.
- acomjean 7y agoWelcome to php world, 5 years ago, when there where an astonishing number of frameworks. It seems to have coalessed around just a few (maybe the lack of the languague being as hot.. has limited resources) Where php ended up somewhat confusingly is the frameworks are now frameworks and components to make web programming easier (syfony/zend...), which seem to be driving drupal and wordpress development. eg: https://symfony.com/ https://symfony.com/
- dragonsh 7y agoNot really 5 years ago Python and its framework were cleaner as it is today. They are mostly based on WSGI or ASGI. The only different breed were grand daddy of all framework called Zope and Twisted Matrix (for network programming besides web). Obviously Zope modernized as library with WSGI support and async support is built into Python.
- rbanffy 7y agoThere are a ton of frameworks, but most deployments choose either Django or Flask, unless they have some really specific need (asyncio is one).
- sergiotapia 7y agoThis looks ridiculously like PHP back in what, 2011ish? Kohana, Cake, Zend, etc etc etc. Ultimately they all collapsed into Laravel or Zend.
- dragonsh 7y agoWell if you will notice all this framework are abstraction over WSGI or ASGI (these are standards in Python Language interface for web programming). So the situation is not same as PHP. Moreover if you look at the framework code of many of them you can replace them easily, for example Flask and bottle.py can be completely replaced by your own code if your service or app grows the intended performance. The lowest common denominator in both is WSGI.
- pjtr 7y agoTurboGears 2 https://turbogears.org/ https://turbogears.org/
- stesch 7y agoWeppy is considered a known older one. That's a sign that I'm getting old.
- papito 7y agoI don't think Falcon is "old guard". It got stable just about 3 years ago.
- toyg 7y agoWelcome to Hacker News, where anything older than two weeks is utterly obsolete and unusable, unless it’s LISP.