pyramid_decoy

Latest PyPI version Documentation Status Number of PyPI downloads Wheel Status Egg Status License

Package status

Tests Coverage Status Requirements Status

pyramid_decoy, a simple pyramid app, which solely purpose is to redirect traffic away to configured location, with hooks (in the future) to be able to plug in a tracking code.

Travis-ci

After creating package on github, move to tracis-ci.org, and turn on ci builds for given package.

Usage

pyramid_decoy’s usage is pretty strightforward. It can work as a standalone app, or other pyramid’s app extension.

Extension

To run it as an extension, include pyramid_decoy either by configuration:

[app:main]
# ...
pyramid.includes = pyramid_decoy
# ...

or within your project’s main method:

def main(global_config, **settings):
    """Build a Pyramid WSGI application."""
    config = Configurator(settings=settings)
    return config.make_wsgi_app()

Standalone

To run as a standalone app, use paste config containing these lines:

[app:main]
use = egg:pyramid_decoy#decoy
decoy.url = http://www.example.com/

Configuration

At this moment, decoy supports only one url that it redirects to. To set it, use decoy.url setting in your app:

[app:main]
#...
decoy.url = http://www.example.com/
#...

License

Copyright (c) 2014 by pyramid_decoy authors and contributors. See Authors

This module is part of pyramid_decoy and is released under the MIT License (MIT): http://opensource.org/licenses/MIT