Change the future

Saturday 10:50 a.m.–11:20 a.m.

5 powerful pyramid features

Carlos de la Guardia

Audience level:
Web Frameworks


Pyramid is a web framework designed to do very well the fundamentals of web applications. Even though it's minimalist in its goals, it provides strong features to let developers deal with these fundamentals. In this talk, we'll look at 5 specific Pyramid features that offer web developers unique flexibility and power.


Pyramid is a web framework designed to do very well the fundamentals of web applications, like mapping of URLs to code, templating, security and serving static assets.

Though Pyramid has a minimalist approach to the core of what it does, it tries to provide very powerful and flexible features for working with these fundamentals. In this talk we will take a look at five core features that make Pyramid special.

The features discussed are:

  • View callables

View callables can be functions, methods of classes, or even instances. We'll see how flexibly views can be configured and how the concept of renderers allows for simple code an easier testing.

  • View predicates

Pyramid allows you to associate more than one view per route. We'll look at what predicates exist and how they can help keeping your code simple. We'll briefly show how a custom predicate can be defined.

  • Asset specifications

Asset specifications are strings that contain both a Python package name and a file or directory name. We'll show how they work and how to override one from other unrelated Pyramid app.

  • Traversal

allows you to create a tree of resources, each of which can be addressed by one or more URLs. Each of those resources can have one or more views associated with it. We'll show why this can be very useful for arbitrarily extensible sites.

  • Extensibility

Pyramid provides a structured “include” mechanism that allows you to combine applications from multiple Python packages. It can also detect conflicts. We'll show examples and explain why these is good for developing extensible applications.