std-uritemplate
std-uritemplate implementation for Python
What it is and what it does
std-uritemplate is a cross-language implementation of the URI Template specification (RFC 6570) Level 4, providing a single public method to expand template strings by substituting variable values. It takes a template string with placeholders and a dictionary of substitutions, then returns the expanded URI. The library is designed with zero dependencies, no regex usage, and no configuration options—just a straightforward expand function that handles primitive type substitutions.
The package is part of a multi-language standardization effort aimed at providing stable, maintainable URI template handling across ecosystems. It supports Python 3.8 through 3.14 and is actively maintained by an independent organization. The implementation prioritizes readability and maintenance over micro-optimizations, making it suitable for applications that need RFC 6570 compliance without external dependencies.
Use it for:
- Build dynamic API URLs in REST clients by substituting host, path, and query parameters into RFC 6570 templates.
- Generate OpenAPI-compliant URIs where URI templates are part of the specification.
- Construct URLs with variable path segments and query strings without external dependencies.
- Expand templated URLs in code generation tools that rely on RFC 6570.
- Create portable URL generation logic that works identically across multiple programming languages.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Expands RFC 6570 URI Templates (Level 4) by substituting variables into template strings to generate URIs.
Yes. The package is actively maintained, has zero dependencies, supports current Python versions (3.8–3.14), carries no known vulnerabilities, and is licensed permissively. Install it when you need RFC 6570 Level 4 URI template expansion without adding dependency weight. The single-method API and design-by-constraint approach make it a low-risk, straightforward choice for standards-compliant URL generation.
Install
std-uritemplate on PyPI
pip
pip install std-uritemplateuv
uv add std-uritemplatepoetry
poetry add std-uritemplateInstalling std-uritemplate
Before you install
Low install friction with no runtime dependencies. Active maintenance with a recent release 29 days ago. Supports Python 3.8 through 3.14.
License in practice
Licensed under Apache-2.0 (permissive), allowing free use, modification, and distribution with minimal restrictions.
Quickstart
pip install std-uritemplate
from std-uritemplate import StdUriTemplate
template = "{scheme}://{host}{/path*}"
substitutions = {"scheme": "https", "host": "example.com", "path": ["a", "b"]}
result = StdUriTemplate.expand(template, substitutions)
Verify before relying
- Whether the Python implementation has been formally reviewed (description marks it as not reviewed but does not explain impact)
- Performance characteristics and suitability for high-volume URI expansion workloads
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<4.0,>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 29 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 14,641,175/month — #1,221 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: std_uritemplate-2.0.12-py3-none-any.whl
Keywords: std-uritemplate, uritemplate, uritemplates, stduritemplate
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
uri-templateExpands RFC 6570 URI Templates with variable…
permissive · top 1,000 on PyPI
uritemplateExpands RFC 6570 URI templates by substituting…
permissive · top 1,000 on PyPI
purlProvides an immutable, chainable URL class for…
permissive · top 15,000 on PyPI
rfc3987Provides RFC 3986 and RFC 3987 compliant…
copyleft · top 5,000 on PyPI
lazr.uriParse, manipulate, and generate URIs with a…
copyleft · top 15,000 on PyPI
sphinx-substitution-extensionsAdds substitution support to Sphinx directives,…
permissive · top 15,000 on PyPI
licenseheadersBatch-updates or adds license headers to source…
permissive · top 15,000 on PyPI
uritoolsParses, validates, and composes URIs and URI…
permissive · top 5,000 on PyPI
rfc3987-syntaxValidates that strings conform to the ABNF…
permissive · top 1,000 on PyPI
rfc3986Parses, validates, and normalizes URIs…
permissive · top 1,000 on PyPI