Pyramid Cheat Sheet
|
This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production. The reference material consulted while preparing these pages is listed in the section bibliography. |
A single-page, colour-coded summary of the Pyramid essentials, written against Pyramid 2.1 (released 2026-03-11),
Python 3.10+ and the companion packages pyramid_tm 2.6, pyramid_jinja2 2.10, pyramid_debugtoolbar 4.12,
pyramid_retry 2.1 and WebTest 3.0 (versions verified 2026-10-07) — the single-file application and the
cookiecutter project run with pserve, the Configurator with scan and include, .ini settings and the
PYRAMID_* variables, add_route patterns, traversal and resources, @view_config and its predicates, renderers
and JSON, the WebOb request and response, exception views, static assets and cache busting, sessions and flash,
the 2.0 security policy with remember and forget and ACLs, CSRF, pyramid_tm with SQLAlchemy and Alembic,
events, tweens and view derivers, internationalization, the p-scripts, pyramid.testing and WebTest, Waitress and
Gunicorn deployment, and a strip of what changed since older tutorials — handy for quick memorization or as a
downloadable PDF desk reference.
For the full explanation, every option, and additional examples, see the dedicated pages:
Start here — Python Pyramid.
Foundations — Introduction & Architecture, Getting Started, Cookiecutter Projects & pserve, Configuration & the Configurator, and Settings, Environment & .ini Files.
Routing and views — URL Dispatch, Traversal & Resources, Views & View Configuration, Errors & Exception Views, Renderers & JSON, Templates, Request & Response, and Static Assets.
State, forms and security — Sessions & Flash Messages, Forms with Deform & Colander, Security Policy & Authentication, Authorization, ACLs & Permissions, and CSRF Protection.
Extending, tooling and testing — Events, Tweens & Hooks, Extending & Add-ons, Internationalization, Command Line & p-scripts, Logging & Debug Toolbar, and Testing.
Production and beyond — Deployment, Advanced Topics, and What’s Changed & Migration.
References
The PDF summarizes the official documentation; each source is cited in full on the page listed above that covers it, and in the section bibliography.