I primarily use Flask for my research project. It was quick to pick up and honestly, I like a more barebones style - one of the reasons I use Sublime Text over IDEs. Plus Miguel Grinberg's tutorial is fantastic at getting you on your feet (though I'm still sour over changes compared to his original tutorial, more because its made it difficult to onboard new developers). However, Pyramid's made some of the coolest shi…
For once I thought, you're bluffing, and the shirts were of some Rock band, but it's indeed for the web framework "Pyramid" xD
A Beginner’s Introduction to Python Web Frameworks (2018)
141–150 of 168 posts
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#142Earlier quoted context omitted.
Same can be said for any system, regardless of the language. Unless you’re able to create an artifact like a single executable or a Jar but you still need to supervise those and keep them running.
Say what you want to about PHP, but when it comes to deployment it’s hard to beat.
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#143Are any of these extremely good compared to a framework not written in Python? For example compared to Rails or Phoenix?
They are probably not much better as frameworks than Rails or Phoenix but using Python allows you to import a lot of things from the Python ecosystem. (eg http://www.developintelligence.com/blog/python-ecosystem-201... )
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#144Of 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…
Maybe a semi-realistic example would help us understand what you mean by the path segment branch in tree of resources part? Is that like /api/ / / / would boil down to /api/cars/ford/fusion/ with cars, ford, and fusion each being a branch in the tree?
That's traversal in a nutshell. Resources can be database objects or any object with a __getitem__ method. Everything about traversal is customizable, but it's rare to need much customization.
Also, if your resources have __parent__ and __name__ attributes, you can ask Pyramid to generate the URL of any resource and view using `request.resource_url(resource, view_name)`, which is really handy for ensuring URLs don't break.
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#145Earlier quoted context omitted.
Everything you wrote is true, however I think using another ORM in Django is asking for trouble, or at least it's missing a lot of the benefit of Django. The way models work with admin, forms, etc is to me what makes Django so efficient. Also, you don't get much by switching Django templates to Jinja.
> Also, you don't get much by switching Django templates to Jinja. Well, you gain a lot of performance - as much as 10x depending on the complexity of your template. Also, Jinja is a lot less crippled than Django Templates (for example, you can't call a function/method with parameters in Django Templates).
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#146Earlier quoted context omitted.
They are probably not much better as frameworks than Rails or Phoenix but using Python allows you to import a lot of things from the Python ecosystem. (eg http://www.developintelligence.com/blog/python-ecosystem-201... )
Yeah. I asked because I really like Python's libraries in general, but I found Flask to be so-so, and I just recently worked on a large project in Django, which I hated. I was hoping there was some kind of up-and-coming framework in Python I didn't know about.
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#147Earlier quoted context omitted.
Everything you wrote is true, however I think using another ORM in Django is asking for trouble, or at least it's missing a lot of the benefit of Django. The way models work with admin, forms, etc is to me what makes Django so efficient. Also, you don't get much by switching Django templates to Jinja.
There are efforts in improving that in 3rd party libs such as django-sorcery [1] which attempts to add Django-like ORM experience but with SQLAlchemy and django-rest-witchcraft [2] which is adding DRF integration to SQLAlchemy models. Not everything Django ORM does is supported however a lot of useful functionality works as expected. For example nested resource updates in serializers in DRF works out of the box witho…
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#148This 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…
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#149Earlier quoted context omitted.
Don't know why this is downvoted - it's crystal clear advice for beginners - "just use Django".
Django brings a lot of concepts with it. It may be simpler to start teaching with Flask and build up from there until the need for something like Django becomes obvious.
You can take care of a lot with just that.
Re: A Beginner’s Introduction to Python Web Frameworks (2018)
#150Earlier quoted context omitted.
Same can be said for any system, regardless of the language. Unless you’re able to create an artifact like a single executable or a Jar but you still need to supervise those and keep them running.
Say what you want to about PHP, but when it comes to deployment it’s hard to beat.