Files
python-barbicanclient/barbicanclient/common/utils.py
2013-08-16 15:18:31 -05:00

11 lines
281 B
Python

import urllib
def proc_template(template, **kwargs):
"""
Processes a templated URL by substituting the
dictionary args and returning the strings.
"""
return template.format(**dict([(k, urllib.quote(v))
for k, v in kwargs.items()]))