Routes

Routes

Routes is a Python re-implementation of the Rails routes system for mapping URLs to application actions, and conversely to generate URLs. Routes makes it easy to create pretty and concise URLs that are RESTful with little effort.

Routes allows conditional matching based on domain, cookies, HTTP method, or a custom function. Sub-domain support is built in. Routes comes with an extensive unit test suite.

Buzzword Compliance: REST, DRY

New features

Version 1.11 (2009-09-28)

  • Completely new manual
  • Add a group of routes under a common URL prefix

Version 1.10 (2008-11-24)

  • A URLGenerator object which is more extensible than url_for()
  • Put redirects directly in the route map, avoiding stub actions in your application
  • Static routes can have path variables

Version 1.9 (2008-06-12)

  • Optional non-Rails'ish syntax for path variables and requirements
  • Minimization is optional and no longer recommended
  • Generating a route by name is more deterministic and faster

Full changelog

Documentation

Download Routes PDF documentation.

Developers / Source Code

Routes' Mercurial repository can be found at http://bitbucket.org/bbangert/routes/.

To check it out:

hg clone http://www.bitbucket.org/bbangert/routes

Download Routes 1.11

Get Routes from the Python Package Index, or install it with:

easy_install -U Routes

Bugs? Suggestions?

Report them at the Bitbucket tracker.