3 ms·
Why do you think pyramid is better?
by lumpypua 12y ago
Why do you think pyramid is better?
- mahmoudimus 12y agoFlask's import time side-effects and has global objects everywhere. It's great for a quick hackathon and a great eco-system, though arguably you can just use Pyramid for that. In my experience, growing bigger with Pyramid has been much easier than it has been w/ Flask. We found ourselves writing most of Pyramid using Werkzeug when it would've made sense to start off with Pyramid in the first place. Pyramid's design for extensibility and design decisions are solid and really make a difference if you're building a real app vs a toy app.
- parham 12y agoI was wounded in what made VIM flake slow while I was using Flask, I'm guessing it's the amount of modules imported at one go. Thanks for making me aware of Pyramid I will look into it further.
- Svenstaro 12y agoIsn't that problem gone if you follow the app factory pattern? Then you only get fairly empty objects during import time.
- Walkman 12y agoYou only return a dictionary from Pyramid views and based on the request, you can choose a renderer like JSON. Look at this example[1] Steps 3, line 16-19. Basically you can develop a Rest API with template rendering side-by-side and you don't even need a framework for it like DRF! [1]: http://static.agendaless.com/pycon2014/json.html http://static.agendaless.com/pycon2014/json.html