skillfed

std-uritemplate

std-uritemplate implementation for Python

std-uritemplate v2.0.12 14.6M downloads/30d#1,221 on PyPI51
Permissive license Apache-2.0 Active released

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-uritemplate

uv

uv add std-uritemplate

poetry

poetry add std-uritemplate

Installing 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

License :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

uri template expansionrfc 6570 implementationurl template substitutionuri template variablestemplate-based url generationuritemplate parserdynamic uri construction
rfc-6570zero-dependenciesurl-generation

More WWW/HTTP packages