We need to write a lot of small APIs in Python for SPAs. We ended up going with FastAPI which utilizes Starlette under the hood. I'm surprised neither of them are mentioned here. Starlette was developed by the same dev who wrote the Django RESTful package. If you mostly just need REST APIs or even GraphQL, it feels far more light and modern than anything in Django and forms some better opinions around things than the…
Do frameworks need to be asynchronous or is it good enough to just spawn threads for background tasks?
A Beginner’s Introduction to Python Web Frameworks (2018)
91–100 of 168 posts
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#92Earlier quoted context omitted.
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)
#93I was forced to encounter Web2Py in an open-source project several years ago. It was awful. Besides the fact that it's stuck in Python 2 (seriously, even today?), it had a lot of bizarre design decisions. For instance, it loaded controllers by concatenating files in a directory - alphabetically. I know Python's import system can confuse some folks, but surely there was a better way. The whole thing left a very sour t…
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#94This 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…
Welcome 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://sym…
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#95Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#96Of 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 f…
Look at, for example, the best of all the flask tutorials of all time, Miguel Greenberg. He still has to create a ton of the boilerplate and then restructure the app half way through.
Pyramid is the goldilocks of frameworks: Just enough to get you going without insanity, and not too much to bog you down.
Here's the real truth: If you're going to build anything nontrivial, you need a ton of stuff that Flask doesn't give you, and the packages that are easy to install and add to your project are mostly anti-pattern.
If you are going to build something nontrivial with Django, you're going to have to tear out large parts of it and redo stuff.
Pyramid is the best balance. The WebSauna team si doing some amazing stuff, and I'm working on something similar that's a little more lightweight. Pyramid is a very active ecosystem. Just a little less exciting because we have some conceptual relationships with Pylons.
If you need async or websockets, I use starlette/fast-api for endpoints that get hit from my mako templates.
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#97Are any of these extremely good compared to a framework not written in Python? For example compared to Rails or Phoenix?
We’re mainly a C# shop with some JavaScript, but I’ve done my time with php, ror and java, and, Django is still my favourite web-framework. Don’t get me wrong I actually like .Net Core, but DB migrations, authentication, testing and productivity is just better in Django (I do have an unnatural hatred for entity framework). Django even had the best learning resource I’ve ever seen with the testing goat book. That bein…
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#98Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#99Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#100This 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.