Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Small Pyramid extension for rewriting urls

Project Description


pyramid_rewrite is a small extension for Pyramid to rewrite urls before further processing takes place.


Just do

pip install pyramid_rewrite


easy_install pyramid_rewrite


pyramid_rewrite runs with pyramid>=1.3 and python>=2.6 and python>=3.2. Other versions might also work.


Usage example:

def main(global_config, **settings):
    config = Configurator(settings=settings)
    # add url rewriting rules...
    #   first parameter is a regular expression
    #   second parameter is the target url
    config.add_rewrite_rule(r'/favicon.ico', r'/static/favicon.ico')
    # ... rest of configuration
    # return WSGI application instance
    return config.make_wsgi_app()

Better documentation might follow.



  • Added unit tests
  • Changed logging level


  • Initial version. Working.
Release History

Release History

This version
History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyramid_rewrite-0.2-py2.6.egg (6.4 kB) Copy SHA256 Checksum SHA256 2.6 Egg Feb 5, 2012
pyramid_rewrite-0.2-py2.7.egg (6.4 kB) Copy SHA256 Checksum SHA256 2.7 Egg Feb 5, 2012
pyramid_rewrite-0.2-py3.2.egg (4.3 kB) Copy SHA256 Checksum SHA256 3.2 Egg Feb 5, 2012
pyramid_rewrite-0.2.tar.gz (4.1 kB) Copy SHA256 Checksum SHA256 Source Feb 5, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting