Pyramid

Pyramid is a flexible, open source Python web framework that makes it easy to build web applications

Pyramid Logo

Overview

Pyramid is a general-purpose web framework that can be used for both small and large applications

Key Features

Flexible Architecture

Pyramid provides flexibility in how you structure your application

from pyramid.config import Configurator
from pyramid.response import Response

def hello_world(request):
    return Response('Hello World!')

config = Configurator()
config.add_route('hello', '/')
config.add_view(hello_world, route_name='hello')
app = config.make_wsgi_app()

URL Traversal

Powerful URL traversal system

config.add_route('article', '/articles/{id}')

Authentication

Flexible authentication system

from pyramid.security import authenticated_userid

def my_view(request):
    userid = authenticated_userid(request)
    return {'userid': userid}

Database Support

Works with various databases through SQLAlchemy or other ORMs

Installation

pip install pyramid

Common Use Cases

Advantages

Disadvantages

Official Documentation

Pyramid Documentation

Version Information