Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
""" A monkey patch for uritemplate which doesn't do any url escaping.
"""
import uritemplate
orig_quote = uritemplate._quote
def expand(template, variables):
uritemplate._quote = _no_quote
ret = uritemplate.expand(template, variables)
uritemplate._quote = orig_quote
return ret
def _no_quote(value, safe, prefix=None):
return value
def expand(template, variables):
uritemplate._quote = _no_quote
ret = uritemplate.expand(template, variables)
uritemplate._quote = orig_quote
return ret
def expand(template, variables):
uritemplate._quote = _no_quote
ret = uritemplate.expand(template, variables)
uritemplate._quote = orig_quote
return ret