Skip to main content

Reads and sets routing configuration from a package

Project description


pyramid_routing is a convenience package, that helps loading routing defined and kept in separate list.


pip install pyramid_routing


To configure routing, you have to first include this package in your pyramid app:


And add routing_package into you settings ini file. This setting should pinpoint the package containing routing.

By default, routing should be defined in package’s module and it’s submodules in lists of dicts. lists should be named routes, and the dict format is the same one as add_route’s method. routes definition is read as is, and for convenience, is loaded at the end. This gives the opportunity to add routes catching all possibilities: /{match}

Module-defined routes will be loaded first, with module name as their prefix. if will contain:

routes = [
    dict(name='blog:index', pattern='/'),
    dict(name='blog:show', pattern="/show"),

blog:index path will be /blog/, while blog:show will become /blog/show


  • read from all lists within package (with list name becoming routes prefix)
  • read routing from yml configuration


To run tests, either type python tests or nosetests --cover-package=tzf.pyramid_routing --cover-tests --with-doctest --with-coverage

Project details

Download files

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

Files for tzf.pyramid_routing, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size tzf.pyramid_routing-0.0.1.tar.gz (3.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page