Files
python-barbicanclient/barbicanclient/common/utils.py
Jarret Raim 23aed669b6 WIP: Architecture
Using the basis architecture from the python-marconiclient package. This
code doesn't really work yet, but I wanted to get an initial version up
as there was some interest.
2013-05-16 08:07:59 -05:00

10 lines
280 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()]))