This is a Python implementation of RFC6570, URI Template, and can expand templates up to and including Level 4 in that specification.