Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

URL routing made right

Project description

Just a small example:

from routr import route, GET, POST
from routr.schema import form, String

routes = route("/users",
  route(POST, "/",          "views.create_user", guards=[form(username=String)]),
  route(GET,  "/{id:int}",  "views.get_user"))

Docs are hosted at excellent readthedocs project.


  • [bugfix] incorrect reversal of urls with more than one param


  • [bugfix] fix bug with RouteGuarded poped up in RouteGroup match
  • add ‘_’ to allowed args in URLPattern


  • introduced RequestParams.exception_factory which abstracts away HTTPBadRequest raise in case of invalid data being supplied
  • [bugfix] RouteGuarded.response now installed correctly, previously it sometimes contained NoUrlMatched objects which are not responses


  • RequestParams.post_processor now also can be accumulated via addition
  • fix bug in RequestParams which prevented Option wrap SchemaNode objects directly


  • fix broken 0.1.2 release by including CHANGES file in dist


  • trace factory made configurable via Configuration.trace attribute
  • method and PATH_INFO extraction delegated to configuration, allows implementing routing for other request wrapper (werkzeug or django’s request for example)
  • routes now have access to configuration object via cfg attribute


  • allow guards return None (routing doesn’t break on this and proceed with old trace)
  • RequestParams now can accept colander.SchemaNode directly (allows to supply validators)


  • initial release

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 routr, version 0.1.7
Filename, size File type Python version Upload date Hashes
Filename, size routr-0.1.7.tar.gz (12.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page