Skip to main content

pyramid_rewrite

Introduction

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

Installation

Just do

pip install pyramid_rewrite

or

easy_install pyramid_rewrite

Compatibility

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

Documentation

Usage example:

def main(global_config, **settings):
    config = Configurator(settings=settings)
    config.include('pyramid_rewrite')
    # 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')
    config.add_rewrite_rule(r'/gallery/(?P<subpath>.*)',
                            r'/root/%(subpath)s')
    #
    # ... rest of configuration
    #
    # return WSGI application instance
    return config.make_wsgi_app()

Better documentation might follow.

Changes

0.2

  • Added unit tests

  • Changed logging level

0.1

  • Initial version. Working.

Metadata

Release files for pyramid_rewrite 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyramid_rewrite 0.2
File Size Uploaded
pyramid_rewrite-0.2.tar.gz 4.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pyramid_rewrite 0.2
File Interpreter ABI Platform
pyramid_rewrite-0.2-py3.2.egg Legacy Egg format - - Details
pyramid_rewrite-0.2-py2.7.egg Legacy Egg format - - Details
pyramid_rewrite-0.2-py2.6.egg Legacy Egg format - - Details

Total release size: 21.1 kB

Release files / pyramid_rewrite-0.2.tar.gz

Download URL pyramid_rewrite-0.2.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9ed1dc59d3264ae348d06daf29cf08a4ff9a76275117b7e61957e3af540f6b9c
BLAKE2b-256 checksum
How to use checksums
4f3e526da98e3673fcb20e7a4a41f3ce1e1bbe72feba5249511baf35eb1db8aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyramid_rewrite-0.2-py3.2.egg

Download URL pyramid_rewrite-0.2-py3.2.egg
Size 4.3 kB
Tags Egg
SHA-256 checksum
How to use checksums
4c31dbf5d0af766cef7310c440c64438c78f8629829ec85daba05965e68c7201
BLAKE2b-256 checksum
How to use checksums
860e9386585e86a85349430400d62bafbfa4f3c8ab8b6da1dfa433a04cd8865c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyramid_rewrite-0.2-py2.7.egg

Download URL pyramid_rewrite-0.2-py2.7.egg
Size 6.4 kB
Tags Egg
SHA-256 checksum
How to use checksums
930c9ced0adf45c485ceb212968437f50f2c99c35bf6957831683c0f40750197
BLAKE2b-256 checksum
How to use checksums
0db6d3871fbeec5f68a4709892e785e7fd51eec4a0362f6dd6cf5ef64330f6f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyramid_rewrite-0.2-py2.6.egg

Download URL pyramid_rewrite-0.2-py2.6.egg
Size 6.4 kB
Tags Egg
SHA-256 checksum
How to use checksums
1bb95f4fe0219be5604ada4f1e45f74dde98285a9ac10d11795f686ca07ba7ff
BLAKE2b-256 checksum
How to use checksums
08f06db37699b4b1a416af09e1cb296fcbf40a357466a03acd4f47946ff758d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2 This release

4 release files

0.1

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page