API Reference
Pyramid
A full-featured Python web framework with traversal and URL dispatch, built on WSGI.
Official Documentation ↗CompatibilityThis documentation covers version
v2.0. Check the official docs for the latest API surface.Installation
pip
pip install pyramidMethods
No methods match this filter.
Pyramid configures routes, views, and security declaratively through a Configurator object.
Key Features
- URL dispatch and traversal
- Configurator with imperative registration
- Flexible auth via security policies
Usage Notes
Pin a version and check the official docs for the API surface you depend on before upgrading.
FAQ
- What is the difference between routes and traversal?
- URL dispatch matches route patterns, while traversal walks an object tree. Pyramid supports both, sometimes in the same app.
- How do I add authorization?
- Set a security policy on the Configurator and decorate views with permission requirements; the policy resolves the current principal.
- How do I serve static files?
- Use config.add_static_view(name, path) so requests under a prefix are served from a directory.
Report a problem with this API docOpens a pre-filled issue on GitHub.