paste.cascade – send requests to multiple applications until success — Paste v1.7.5 documentation

### Navigation

- index
- modules |
- Paste v1.7.5 documentation »

# `paste.cascade` – send requests to multiple applications until success

Cascades through several applications, so long as applications return `404 Not Found`.

## Module Contents

class `paste.cascade.` `Cascade`(applications, catch=(404, ))

  Passed a list of applications, `Cascade` will try each of them in turn. If one returns a status code listed in `catch` (by default just `404 Not Found`) then the next application is tried.

  If all applications fail, then the last application’s failure response is used.

  Instances of this class are WSGI applications.

`paste.cascade.` `make_cascade`(loader, global_conf, catch='404', **local_conf)

  Entry point for Paste Deploy configuration

  Expects configuration like:

      [composit:cascade]
      use = egg:Paste#cascade
      # all start with 'app' and are sorted alphabetically
      app1 = foo
      app2 = bar
      ...
      catch = 404 500 ...

### Navigation

- index
- modules |
- Paste v1.7.5 documentation »