Skip to content

Instantly share code, notes, and snippets.

@SimonSapin
Created November 15, 2012 12:41
Show Gist options
  • Save SimonSapin/4078445 to your computer and use it in GitHub Desktop.
Save SimonSapin/4078445 to your computer and use it in GitHub Desktop.
Signed integer converter for Werkzeug routing.
from werkzeug.routing import IntegerConverter
class SignedIntegerConverter(IntegerConverter):
regex = r'-?\d+'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment