Pyramid is a very flexible framework, but when dealing with large projects and multiple developers it pays to establish a few ground rules and follow some conventions.
Karl is one of the largest Pyramid applications in production. It actually guided the development of repoze.BFG, the ancestor of Pyramid. We'll use the Karl code base to illustrate some of the patterns that were used both to organize the project and deal with a large user base.
KARL is an open source web system for collaboration, organizational intranets, and knowledge management. Developed by the Open Society Foundations (OSF), it was first introduced to the market in 2008, and is now used by many international organizations, such as OXFAM GB, and OSF.
Not everything discussed will be based on Karl, though. There are some key questions about how to define a project that are common to any Pyramid development, such as which persistence system to use and whether to go with traversal or URL dispatch. I'll cover a few of those questions on the first segment.
Among the things that will be covered are:
Hard questions you need to answer before beginning your project. Pyramid offer many configuration possibilities and I'll go into them briefly. Tips for how to assemble your toolkit, how to choose a persistence backend, whether to use traversal or routes, how to handle authentication and authorization and how to layout the project. (8 min.)
Views. Pyramid has a very strong view configuration system. I'll cover how to take advantage of it, how to use predicates effectively and how to create custom predicates. People usually find themselves having to pass lots of information to the templates, so I'll discuss an strategy to deal with this. (7 min.)
Code patterns. I'll single out some useful patterns from karl and discuss them briefly. (8 min.)
Deployment and maintenance. There are also many options for this (e.g. Nginx or mod_wsgi, use buildout or not, useful deployment tools)and I'll go over them quickly. (5 min.)