Live data from Hacker News

A Beginner’s Introduction to Python Web Frameworks (2018)

stxnext.com

41–50 of 168 posts

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#41

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://gi…

Django is a pretty big omission from your list.

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#42
post #37

Earlier quoted context omitted.

async is more beneficial for when code is primarily network bound. WSGI is thread based which comes with a higher overhead for task switching. So it’s just not as efficient for most web server tasks.

Ok I think I get it, but if your backend is say, making a single API call and sending that result back to the user, then there's no advantage to going async since the user has to wait for that network call anyways, right? Would you use this async then in instances where some of the API calls don't matter to your user?

I don’t know about Starlette/FastAPI, but generally a true async server could still see a benefit, because while that downstream call is blocked waiting on a response, the OS thread can switch to a different request. This is in contrast to a more traditional one-OS-thread-per-request model, where each thread spends the vast majority of its time waiting on I/O. If your work is I/O bound you can use expensive OS threads much more efficiently. Depends on your workload characteristics and requirements.

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#43

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://gi…

Django is a pretty big omission from your list.

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

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#44

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://gi…

Any of those have good Swagger integration?

https://swagger.io/

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#45
post #44

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://gi…

Any of those have good Swagger integration? https://swagger.io/

Funny you should ask: https://github.com/berislavlopac/pyotr ;)

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#46
post #44

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://gi…

Any of those have good Swagger integration? https://swagger.io/

FastAPI (built on Starlette) essentially generates your OpenAPI docs for free via intuitive use of decorators and type hints/Pydantic models.

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#47

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://gi…

Zope is probably the granddaddy of them all. Tried and failed miserably to use it 20 years ago.

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#48

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://gi…

Is there any python framework that optimizes for developer productivity?

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#49
Of these frameworks, Pyramid is the only one I know of that uses the concept of traversal. Traversal is an elegant way to tame big projects. Whenever I look at a web framework, I look for traversal and I'm always a little disappointed to see it's missing.

Traversal means the framework treats each path segment in the URL as a possible branch in a tree of resources provided by the app. After completing traversal, the framework looks up a context-dependent view and checks a contextual access control list before calling the view. It feels right to declare security restrictions and other conditions outside the view.

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#50

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://gi…

Zope is probably the granddaddy of them all. Tried and failed miserably to use it 20 years ago.

I 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.
Post reply on HN