The Start Small, Finish Big Stay Finished Framework

Projects with ambition start small but finish big and must stay finishedYou need a Python web framework that supports your decisionsby artisans for artisans.

Try Pyramid

Hello World App

            from wsgiref.simple_server import make_server
from pyramid.config import Configurator
from pyramid.response import Response

def hello(request):
    return Response('Hello world!')

if __name__ == '__main__':
    config = Configurator()
    config.add_route('hello_world', '/')
    config.add_view(hello, route_name='hello_world')
    app = config.make_wsgi_app()
    server = make_server('', 8080, app)

Easy To Start

Let's create a minimal web app in 5 minutes using Python 3.

1. Install Python

Install the latest Python 3 from

2. Install Pyramid

            $ pyvenv myproject
$ cd myproject
$ bin/pip install pyramid

3. Create your first app

Using your editor, put the Hello World App code into a new file named

4. Run your app

            $ bin/python

5. Open your app

Visit the URL in a web browser.

When You Need Pyramid

Megaframeworks make decisions for you. But if you don't fit their viewpoint, you end up fighting their decisions. Microframeworks force no decisions, making it easy to start. But as your application grows, you're on your own.

In both cases, the focus is on the start: either too much or too little. Either way, finishing and staying finished is hard. You need a finishing-focused framework with an architectural design that scales down to getting started, then up as your application grows.

Pyramid was made for just this. It's a Goldilocks Solution: not too small, not too big, just right.

Pyramid The Start Small, Finish Big, Stay Finished Framework.

Start Small

Getting started quickly and simply is a key attraction of lightweight frameworks. Equally, you get to choose what approaches to use for templating, database, security, and more, or use a convenient starting point with a scaffold. Pyramid excels at scaling down to the first hour of learning, while avoiding the pitfalls of framework magic.

  • Start as a single-file module with little first-hour complexity
  • Use a convenient scaffold to generate a sample project with your combination of subsystems
  • Choose from a variety of templating, database, security solutions and more using the quality and convenience of Pyramid's add-on system
  • Tap into a variety of high-quality evaluator and advanced developer documentation
  • Ask the growing Pyramid community for tips and successes

Finish Big

Ambitious projects aspire to grow big without losing their dignity. Pyramid is uniquely equipped to scale with you. Its configuration, extension, and add-on system gives the skeleton to support your ambitions, and its architecture ensures that you don't lose those performance and quality features you started with.

  • Include and configure Pyramid add-ons inside your application
  • Override and customize core code and add-ons from the outside, without forking
  • Build and deliver re-usable subsystems inside and outside our organization
  • Less magic by forgoing globals and importside-effects
  • Use the configuration system to keep your wiring separate from your code
  • Numerous extension facilities built into the framework
  • Use Pyramid as a "framework framework" to craft your own special-purpose, domain-specific web system
  • Gain insight from our long-standing culture of systems that organically get big

Stay Finished

Pyramid's simple first hour helps you get started and its extensability helps you finish your ambitions. There's life after shipping. Pyramid helps keep your application finished by understanding the full life cyle of a professional web application.

  • Deep commitment to API stability and bug fixing over the 120+ software releases
  • Culture of 100% test and documentation coverage makes Pyramid a future-proof choice
  • Keeping configuration out of code means less forking and side-effects
  • Long history of repeatable deployments provides a community culture of helpful tips
  • Top-notch performance even as Pyramid grows
  • Deep extensibility and large-scale design patterns means you won't outgrow it
  • Strong following of Python practices (WSGI, packages, virtual environments, first to support Python 3) means you won't be out of the Python mainstream

Supports Your Decisions

Full-stack frameworks provide built-in value by telling you what to do. But doing something different, or using something better, leads to the dreaded "fighting the framework". Pyramid starts from a very small base, providing many high-quality choices.

  • Don't waste time fighting the framework's decisions
  • "Only pay for what you eat" means less magic to live with in production
  • No bundled templating system but instead, three very high-quality add-ons
  • Several form systems covering most of the common design tastes
  • Deep integration with SQLAlchemy for best-of-breed ORM

By Artisans, For Artisans

The Pyramid team has been doing ambitious Python web frameworks since 1995. We have built small systems and huge systems. From this, we delight in helping others who appreciate quality and dream big.

  • Builders of the first open source application server
  • Bootstrapper of the PSF and member of its first board
  • Support letting quality artisans add real value by quickly but durably making specific experiences