Extending Pyramid

Pyramid may be extended through add-ons and development environments. The Python Package Index trove classifier "Framework :: Pyramid" is used by over 470 packages. Support may be "official" by the Pylons Project or "unofficial" by the community.

All projects under the Pylons Project have 100% test coverage and 100% documentation.

An "add-on" is a package which relies on Pyramid itself and extends the functionality of Pyramid, such as adding an ORM, sending email, or using a template-based language. If your add-on does not rely on Pyramid, it's not an add-on, but just a library, and it will not be listed on the Extending Pyramid page. Official Pylons Project libraries may be listed.

"Development environments" are a special category of packages which use Pyramid as a core, but offer alternative services and scaffolding to ease web application development. Some could be labeled "content management system" or "admin interface". Development environments often have dependencies beyond those of the Pyramid core.

Contributing add-ons

Add-ons may be created and shared wherever you like. Pylons Project supported add-ons must be under its GitHub organization account, and comply with guidelines for How to Contribute Source Code and Documentation, Coding Style and Standards, and Unit Testing Guidelines. All Pylons Project participants should strive to follow our Code of Conduct.

To add your project to the listing, see Adding an add-on to "Extending Pyramid" page in CONTRIBUTING.md.

aiopyramid

Run pyramid using asyncio.
Maintainers: housleyjk
PyPI VCS Docs

Akhet

A Pyramid library and demo application with a Pylons-like feel. Its most known for its former application scaffold, which helped users transition from Pylons and those preferring a more Pylons-like API. The scaffold has been retired but the demo plays a similar role.
Maintainers: Mike Orr
PyPI VCS Docs

apex

Toolkit for Pyramid to add Authentication and Authorization using Velruse (OAuth) or a local database, CSRF, ReCaptcha, Sessions, Flash messages, and I18N.
Maintainers: cd34
PyPI VCS Docs

Authomatic

Simple yet powerful authorization and authentication client library for Python web applications.
Maintainers: peterhudec
Home PyPI VCS Docs Demo

Cliquet

Cliquet is a toolkit to ease the implementation of HTTP microservices, such as data-driven REST APIs.
Maintainers: Mozilla Services, n1k0, tarek, alexis.metaireau, leplatrem, Natim
PyPI VCS Docs

colander

A serialization/deserialization/validation library for strings, mappings, and lists.
Maintainers: tseaver, chrism, mmerickel
PyPI VCS Docs

ColanderAlchemy

Auto-generate Colander schemas that are based on SQLAlchemy mapped classes.
Maintainers: tisdall, stefanofontanelli
PyPI VCS Docs

cone.app

A comprehensive web application stub on top of Pyramid
Maintainers: rnixx
PyPI VCS Docs

Cornice

Provides helpers to build and document REST-ish web services with Pyramid, with decent default behaviors. It takes care of following the HTTP specification in an automated way where possible.
Maintainers: Mozilla Services, n1k0, leplatrem, natim, tarek, alexis.metaireau, rafrombrc, rfk
PyPI VCS Docs

deform

A Python HTML form generation library.
Maintainers: chrism, miohtama, ericoandrei, stevepiercy
PyPI VCS Docs Demo

gevent-socketio

gevent-socketio is a Python implementation of the Socket.IO protocol, developed originally for Node.js by LearnBoost and then ported to other languages.
Maintainers: @bourgetalexndre and seeking new maintainers
PyPI VCS Docs

horus

User registration and login system for the Pyramid Web Framework.
Maintainers: sontek
PyPI VCS

hupper

A process monitor / reloader for developers that can watch files for changes and restart the process.
Maintainers: mmerickel
PyPI VCS Docs

Khufu Project

Khufu is an application scaffolding for Pyramid that provides an environment to work with Jinja2 and SQLAlchemy.
Maintainers: Rocky Burt
Home VCS Docs

Kinto

Kinto is a lightweight JSON storage service with synchronisation and sharing abilities.
Maintainers: Mozilla Services, n1k0, Natim, tarek, alexis.metaireau, leplatrem
PyPI VCS Docs

Kotti

Kotti is a high-level, Pythonic web application framework. It includes an extensible Content Management System called the Kotti CMS, offering all the features you would expect from a modern CMS.
Maintainers: witsch, j23d, disko, nouri
Home PyPI VCS Docs Demo

lingua

Lingua is a package with tools to extract translatable texts from your code, and to check existing translations. It replaces the use of the xgettext command from gettext, or pybabel from Babel.
Maintainers: wichert
PyPI VCS Docs

marshmallow

A lightweight library for converting complex objects to and from simple Python data types (i.e., (de)serialization and validation).
Maintainers: sloria
PyPI VCS Docs

nefertari

Nefertari is a REST API framework for Pyramid that uses ElasticSearch for reads and either MongoDB or Postgres for writes. It provides an interface to ElasticSearch's Query String DSL for full text search.
Maintainers: Jonathan.Stoikovitch, chrstphrhrt
PyPI VCS Docs

Nive CMS

Nive is a new, "out of the box", open source content management system based on the programming language Python and the Pyramid web framework.
Maintainers: adroullier
Home VCS Docs

paginate

Python pagination module.
Maintainers: ergo, crooksey, signum
PyPI VCS Docs

plaster

A configuration loader interface around multiple file formats.
Maintainers: Michael Merickel
Home PyPI VCS Docs

Ptah

Ptah is a fast, fun, open source, high-level Python web development environment.
Maintainers: fafhrd, runyaga
PyPI VCS Docs

Pyramid Runner

A minimal Pyramid scaffold that aims to provide a starter template to build small to large web services.
Maintainers: Asif Mahmud Shimon
Home VCS

pyramid_apispec

Create an OpenAPI specification file using apispec and Marshmallow schemas.
Maintainers: ergo
Home PyPI VCS Docs Demo

pyramid_authsanity

Provides a secure authentication policy with an easy to use backend.
Maintainers: Bert JW Regeer
PyPI VCS Docs

pyramid_authstack

Use multiple authentication policies with Pyramid.
Maintainers: wichert
PyPI VCS

pyramid_autodoc

Sphinx extension for documenting your Pyramid APIs.
Maintainers: sciyoshi, kaboomfox, sontek
PyPI VCS Docs

pyramid_autowire

Automatically injects dependencies into Pyramid views
Maintainers: NickBeeuwsaert
Home PyPI VCS Docs

pyramid_basemodel

a thin, low level SQLAlchemy binding to Pyramid
Maintainers: fizyk, thruflo
Home PyPI VCS

pyramid_beaker

Beaker session backend plug-in.
Maintainers: Ben Bangert, Chris McDonough
PyPI VCS Docs

pyramid_bowerstatic

Integration of Bowerstatic in Pyramid
Maintainers: mrijken
PyPI VCS

pyramid_bpython

bpython bindings for Pyramid's pshell
Maintainers: mmerickel
PyPI VCS Docs

pyramid_celery

Pyramid configuration with celery integration. Allows you to use Pyramid .ini files to configure celery and have your Pyramid configuration inside celery tasks.
Maintainers: sontek
PyPI VCS Docs

pyramid_chameleon

Chameleon templating bindings for Pyramid
Maintainers: Chris McDonough
PyPI VCS Docs

pyramid_debugauth

Debug Authentication Policy for Pyramid
Maintainers: Pior Bastida
Home PyPI VCS Docs

pyramid_debugtoolbar

An interactive HTML debug toolbar for Pyramid.
Maintainers: Chris McDonough, Blaise Laflamme, Michael Merickel
PyPI VCS Docs

pyramid_debugtoolbar_dogpile

dogpile caching support for pyramid_debugtoolbar
Maintainers: jvanasco
PyPI VCS

pyramid_dogpile_cache

dogpile.cache configuration package for Pyramid.
Maintainers: moriyoshi
PyPI VCS Docs

pyramid_elfinder

Connector for elfinder file manager
Maintainers: uralbash
VCS Docs

pyramid_exclog

A package which logs exceptions from Pyramid applications.
Maintainers: Chris McDonough
PyPI VCS Docs

pyramid_extdirect

Plugin that provides a router for the ExtDirect Sencha API included in ExtJS.
Maintainers: jenner
PyPI VCS

pyramid_formalchemy

Auto-generated, customizable HTML input form fields from your SQLAlchemy mapped classes.
Maintainers: Gael Pasgrimaud
PyPI VCS Docs Demo

pyramid_fullauth

pyramid_fullauth provides full user registration and management functionality for Pyramid based web applications.
Maintainers: fizyk
PyPI VCS Docs

pyramid_handlers

Analogue of Pylons-style "controllers" for Pyramid. Note: Outgrowing Pyramid Handlers
Maintainers: Ben Bangert, Chris McDonough
PyPI VCS Docs

pyramid_ipython

IPython bindings for Pyramid's pshell
Maintainers: mmerickel
PyPI VCS Docs

pyramid_jinja2

Jinja2 template renderer for Pyramid
Maintainers: Domen Kožar
PyPI VCS Docs

pyramid_jqm

Scaffolding for developing jQuery Mobile apps with Pyramid.
Maintainers: Chris McDonough
PyPI VCS Docs

pyramid_jwt

Implementation of an authentication policy for Pyramid that uses JSON Web Tokens. This standard (RFC 7519) is often used to secure backend APIs. The excellent PyJWT library is used for the JWT encoding / decoding logic.
Maintainers: wichert
PyPI VCS Docs

pyramid_layout

Pyramid add-on for managing UI layouts.
Maintainers: Chris Rossi, Paul Everitt, Blaise Laflamme
PyPI VCS Docs

pyramid_ldap

An LDAP authentication policy for Pyramid.
Maintainers: Chris McDonough
PyPI VCS Docs

pyramid_ldap3

pyramid_ldap3 provides LDAP authentication services for your Pyramid application. It is a fork of the pyramid_ldap package with the goal of eliminating the dependency on python-ldap and ldappool, replacing it with a dependency on ldap3, which is a pure Python package that supports both Python 2 and Python 3.
Maintainers: Christoph Zwerschke, Chris McDonough
Home PyPI VCS Docs

pyramid_mailer

A package for the Pyramid framework to take the pain out of sending emails.
Maintainers: Dan Jacobs, Chris McDonough
PyPI VCS Docs

pyramid_mailgun

This package integrates the Mailgun service with the Pyramid web framework.
Maintainers: evannook
PyPI VCS

pyramid_mako

Mako templating bindings for Pyramid.
Maintainers: Bert JW Regeer
PyPI VCS Docs

pyramid_marrowmailer

Pyramid integration package for marrow.mailer, formerly known as TurboMail
Maintainers: iElectric
PyPI VCS Docs

pyramid_mongodb

Basic Pyramid scaffold to easily use MongoDB for persistence with the Pyramid Web framework.
Maintainers: Niall O'Higgins
PyPI VCS

pyramid_mongodb2

Provides a mongodb integration with your Pyramid application. Comes with a debugtoolbar and supports multiple databases.
Maintainers: jonno_ftw
Home PyPI VCS

pyramid_mongoengine

Pyramid-mongoengine package based on flask-mongoengine.
Maintainers: marioidival
PyPI VCS Docs

pyramid_multiauth

An authentication policy for Pyramid that proxies to a stack of other authentication policies.
Maintainers: leplatrem, natim, rafrombrc, alexis.metaireau, tarek, rfk
PyPI VCS

pyramid_nacl_session

Defines an encrypting, pickle-based cookie serializer, using PyNaCl to generate the symmetric encryption for the cookie state.
Maintainers: Tres Seaver
PyPI VCS Docs

pyramid_openapi3

Validate Pyramid views against an OpenAPI 3.0 document.
Maintainers: zupo, mmerickel, xistence
Home PyPI VCS Docs Demo

pyramid_pages

Provides a collection of web pages to your Pyramid application. This is very similar to django.contrib.flatpages but with a tree structure and traversal algorithm in URL dispatch.
Maintainers: uralbash
PyPI VCS Docs

pyramid_persona

Provides persona authentication. Note: On November 30th, 2016, Mozilla will shut down the persona.org services. Persona.org and related domains will be taken offline.
Maintainers: madjar
PyPI VCS Docs Demo

pyramid_pycallgraph

This package provides a Pyramid tween to generate a callgraph image for every request.
Maintainers: disko
PyPI VCS

pyramid_redis_sessions

Session factory backed by Redis.
Maintainers: erasmas
PyPI VCS Docs

pyramid_retry

An execution policy for Pyramid that supports retrying requests after certain failure exceptions.
Maintainers: Michael Merickel
PyPI VCS Docs

pyramid_royal

Royal is a Pyramid extension which eases writing RESTful web applications.
Maintainers: ludia, Merwok, hadrien
PyPI VCS Docs

pyramid_rpc

RPC service add-on for Pyramid. Supports XML-RPC in a more extensible manner than pyramid_xmlrpc with support for JSON-RPC and AMF.
Maintainers: Michael Merickel, Ben Bangert
PyPI VCS Docs

pyramid_rq

Support using the RQ queueing system with Pyramid.
Maintainers: wichert
VCS

pyramid_sacrud

Pyramid CRUD interface. Provides an administration web interface for Pyramid.
Extensions:
* ps_alchemy - provides SQLAlchemy models.
* ps_tree - displays a list of records as tree. This works fine with models from sqlalchemy_mptt.
Maintainers: uralbash
PyPI VCS Docs

pyramid_services

Defines a pattern and helper methods for accessing a pluggable service layer from within your Pyramid apps.
Maintainers: mmerickel
PyPI VCS Docs

pyramid_simpleauth

Session-based authentication and role based security.
Maintainers: thruflo, andrecp
PyPI VCS Docs

pyramid_skins

This package provides a simple framework to integrate code with templates and resources.
Maintainers: fschulze, malthe, witsch
PyPI VCS Docs

pyramid_sms

SMS services for Pyramid framework.
Maintainers: miohtama
PyPI VCS Docs

pyramid_sqlalchemy

Provides some basic glue to facilitate using SQLAlchemy with Pyramid.
Maintainers: wichert
PyPI VCS Docs

pyramid_storage

A simple file upload manager for the Pyramid framework. It currently supports uploads to the local file system and to the Amazon S3 cloud storage service.
Maintainers: danjac
PyPI VCS Docs

pyramid_swagger

Convenient tools for using Swagger to define and validate your interfaces in a Pyramid webapp.
Maintainers: Scott Triglia
PyPI VCS Docs

pyramid_tablib

tablib renderer factory (xlsx, xls, csv) for Pyramid.
Maintainers: lxneng
PyPI VCS

pyramid_tm

Centralized transaction management for Pyramid applications (without middleware).
Maintainers: Chris McDonough
PyPI VCS Docs

pyramid_webassets

Pyramid extension for working with the webassets library.
Maintainers: tilgovi, sontek
PyPI VCS

pyramid_who

Authentication policy for Pyramid using repoze.who 2.0 API.
Maintainers: Chris McDonough, Tres Seaver
PyPI VCS Docs

pyramid_xmlrpc

XML-RPC add-on for Pyramid
Maintainers: Chris McDonough
PyPI VCS Docs

pyramid_yosai

Yosai is a security framework that offers two-factor authentication, permission and role based authorization, and session management from a developer-friendly API. pyramid_yosai integrates yosai with pyramid web applications.
Maintainers: Darin Gordon
Home PyPI VCS Docs

pyramid_zcml

Zope Configuration Markup Language configuration support for Pyramid.
Maintainers: Chris McDonough
PyPI VCS Docs

pyramid_zodbconn

ZODB Database connection management for Pyramid.
Maintainers: Chris McDonough, Chris Rossi
PyPI VCS Docs

pyramid-bugsnag

Pyramid extension to configure and integrate the Bugsnag client
Maintainers: Pior Bastida
Home PyPI VCS Docs

pyramid-cookiecutter-alchemy

A cookiecutter (project template) for creating a Pyramid project using SQLite as persistent storage, SQLAlchemy as an ORM, URL dispatch for routing, and Jinja2 for templating.
Maintainers: cguardia
VCS

pyramid-cookiecutter-starter

A cookiecutter (project template) for creating a Pyramid starter project using Chameleon for templating.
Maintainers: cguardia
VCS

pyramid-cookiecutter-zodb

A cookiecutter (project template) for creating a Pyramid project using ZODB for persistent storage, traversal for routing, and Chameleon for templating.
Maintainers: cguardia
VCS

pyramid-csp

Add a Content Security Policy to your HTTP responses.
Maintainers: luhn
Home PyPI VCS Docs

pyramid-dynamodb-sessions

DynamoDB-backed sessions
Maintainers: luhn
PyPI VCS Docs

pyramid-excel

pyramid-excel is based on pyexcel and makes it easy to consume and produce information stored in Excel files over HTTP protocol as well as on the file system. This library can turn the Excel data into a list of lists, a list of records (dictionaries), and dictionaries of lists, and vice versa.
Maintainers: chfw
Home PyPI VCS Docs

pyramid-jsonapi

Create a JSON-API standard API from a database using the SQLAlchemy ORM and Pyramid web framework. Includes schema validation and documentation generation (OpenAPI).
Maintainers: Colin Higgs
Home PyPI VCS Docs

pyramid-log

A logging formatter which makes Pyramid request attributes available for us in its format string.
Maintainers: Jeff Dairiki
PyPI VCS

pyramid-opentracing

OpenTracing library/tween for tracing/integration of Pyramid's requests.
Maintainers: Carlos Alberto Cortez
Home PyPI VCS Docs

pyramid-resource

A simple base resource class for URL traversal in Pyramid.
Maintainers: luhn
Home PyPI VCS Docs

pyramid-tasks

Bring parity to Pyramid and Celery by creating a full Pyramid application in the Celery worker and providing a request object for each task.
Maintainers: luhn
Home PyPI VCS Docs

pytest_pyramid

pytest_pyramid - provides fixtures for testing Pyramid applications within pytest test suite
Maintainers: fizyk
PyPI VCS

Python Social Auth

Social authentication/registration mechanism with support for a large number of providers.
Maintainers: omab
Home PyPI VCS Docs

ramses

Ramses is a framework that generates a RESTful API using RAML. It uses Pyramid and Nefertari, which provides Elasticsearch / Posgres / MongoDB / Your Data Store™ -powered views.
Maintainers: Jonathan.Stoikovitch, chrstphrhrt
Home PyPI VCS Docs

rest_toolkit

rest_toolkit is a Python package which provides a very convenient way to build REST servers. It is build on top of Pyramid, but you do not need to know much about Pyramid to use rest_toolkit.
Maintainers: wichert
PyPI VCS Docs

Ringo

Ringo is a Python based high level web application framework build on top of Pyramid. The framework can be used to build form based management or administration software.
Maintainers: ti
Home PyPI VCS Docs

Stargate

Stargate is a package for adding WebSockets support to Pyramid applications using the excellent eventlet library for long running connections.
Maintainers: boothead
PyPI VCS Docs

Substance-D

An application server built upon the Pyramid web framework. It provides a user interface for managing content as well as libraries and utilities which make it easy to create applications.
Maintainers: chrism, cguardia
Home PyPI VCS Docs Demo

substanced-cookiecutter

A cookiecutter (project template) for creating a Substance D starter project.
Maintainers: cguardia
VCS

SUMA

Microservice to manage external links.
Maintainers: rach
PyPI VCS

tomb_routes

A set of sane routing defaults for the Pyramid web framework.
Maintainers: msabramo, sontek
PyPI VCS

Tonnikala

Python templating engine with Pyramid integration.
Maintainers: hieu.nguyen, ztane
PyPI VCS Docs

velruse

Simplifying third-party authentication for web applications. It supports most auth providers.
Maintainers: bbangert, mmerickel
PyPI VCS Docs

waitress

Waitress is meant to be a production-quality pure-Python WSGI server with very acceptable performance. It has no dependencies except ones which live in the Python standard library.
Maintainers: chrism, xistence
PyPI VCS Docs

webargs

A friendly library for parsing HTTP request arguments, with built-in support for popular web frameworks.
Maintainers: sloria
PyPI VCS Docs

Websauna

Websauna is a full stack application framework aimed for creating consumer and business web services built on top of Pyramid and SQLAlchemy.
Maintainers: Mikko Ohtamaa (@miohtama), Érico Andrei (@ericof)
Home PyPI VCS Docs

webtest

Wraps any WSGI application and makes it easy to send test requests to that application, without starting up an HTTP server.
Maintainers: iElectric, gawel, ianb
PyPI VCS Docs

WTForms

A flexible forms validation and rendering library for Python web development.
Maintainers: prencher, crast
PyPI VCS Docs

ziggurat_foundations

Framework agnostic set of SQLAlchemy classes that make building applications that require permissions an easy task.
Maintainers: ergo
PyPI VCS Docs

zope.sqlalchemy

Integration of SQLAlchemy with transaction management. See also What the Zope Transaction Manager Means To Me (and you).
Maintainers: chrism, laurencerowe
PyPI VCS Docs

Making good add-ons

Add-on packages should be named pyramid_foo where foo describes the functionality of the package. For example, pyramid_mailer is a great name for something that provides outbound mail service. If the name you want has already been taken, try to think of another, for example, pyramid_mailout. If the functionality of the package cannot easily be described with one word, or the name you want has already been taken and you can't think of another name related to functionality, use a codename, for example, pyramid_postoffice.

If your package provides "configuration" functionality, you will be tempted to create your own framework to do the configuration, like the following:

              class MyConfigurationExtender(object):
    def __init__(self, config):
        self.config = config

    def doit(self, a, b):
        self.config.somedirective(a, b)

extender = MyConfigurationExtender(config)
extender.doit(1, 2)
            

Instead of doing so, use the add_directive method of a configurator as documented at Adding Methods to the Configurator via add_directive:

              def doit(config, a, b):
    config.somedirective(a, b)

config.add_directive('doit', doit)
            

If your add-on wants to provide some default behavior, provide an includeme method in your add-on's __init__.py, so config.include('pyramid_foo') will pick it up. See Including Configuration From External Sources.

Making Good Development Environments

If you are creating a higher-level framework atop the Pyramid codebase that contains "template" code (skeleton code rendered by a user via pcreate -t foo), for the purposes of uniformity with other "development environment" packages, we offer some guidelines below.

  • It should not be named with a pyramid_ prefix. For example, instead of pyramid_foo it should just be named foo. The pyramid_ prefix is best used for add-ons that plug some discrete functionality in to Pyramid, not for code that simply uses Pyramid as a base for a separate framework with its own "opinions".
  • It should be possible to subsequently run pserve development.ini to start any pcreate-rendered application.
  • development.ini should ensure that the pyramid_debugtoolbar package is active.
  • There should be a production.ini file that mirrors development.ini but disincludes pyramid_debugtoolbar.
  • The [server:main] section of both production.ini and development.ini should start paste.httpserver on port 6543:

                  [server:main]
    use = egg:Paste#http
    host = 0.0.0.0
    port = 6543
                

  • development.ini and production.ini should configure logging (see any existing template).
  • It should be possible to use pshell development.ini to visit an interactive shell using a pcreate-rendered application.
  • Startup/configuration code should live in a function named main within the __init__.py of the main package of the rendered template. This function should be linked within a paster.app_factory section in the template's setup.py like so:

                  entry_points = """\
    [paste.app_factory]
    main = {{package}}:main
    """
                

  • This makes it possible for users to use the following pattern (particularly use = egg:{{project}}):

                  [app:{{project}}]
    use = egg:{{project}}
    reload_templates = true
    .. other config ..
                

  • WSGI middleware configuration should not be inlined into imperative code within the main function. Instead, middleware should be configured within a [pipeline:main] section in the configuration file:

                  [pipeline:main]
    pipeline =
        egg:WebError#evalerror
        tm
        {{project}}