std-uritemplate is a Python library providing a robust and compliant implementation of RFC 6570, the URI Template specification. It allows users to expand URI templates with provided variables, generating complete URIs. The library is actively maintained, with frequent patch releases within major versions, and is currently at version 2.0.8.
pip install std-uritemplateVerified import paths — ran on the pinned version, not inferred.
Initialize a URITemplate object with your template string. Use the `expand` method to fill in variables and generate the final URI. `partial_expand` can be used to expand a subset of variables, returning a new `URITemplate` object with the remaining unexpanded variables.
Migrate existing code to use `URITemplate(template_str).expand(**variables)` instead of `uritemplate.expand(template_str, **variables)`.
Instantiate `URITemplate` and call its `expand()` or `partial_expand()` methods. Example: `URITemplate(template).expand(var=value)`.
Consult RFC 6570 for specific behavior of operators and variable types, and test template expansions thoroughly, especially with complex data structures.
Ensure you use `import uritemplate` or `from uritemplate import ...` after `pip install std-uritemplate`.
No dependency data recorded yet.