Flask is a “micro framework” designed for smaller applications with less requirements. Pyramid and Django are both geared at larger projects, but they approach extension and flexibility in different ways.
Pyramid is designed to be flexible, allowing the developer to use the best tools for their project. This means that the developer may choose the database, URL structure, templating style, and other options. Django aspires to include all of the batteries that a web application would require, so programmers simply need to open the box and start working, bringing in Django’s many components as they go.
Django includes an ORM by default, but Pyramid and Flask provide the developer control over how (and whether) their data is stored. SQLAlchemy is the most popular ORM for non-Django web apps, but there are lots of alternative options, ranging from DynamoDB and MongoDB to simple local persistence like LevelDB or regular SQLite. Pyramid is designed to work with any sort of persistence layer, even those that have yet to be conceived.