uritemplate
Implementation of RFC 6570 URI Templates
Decision gist · record as of 2026-08-14
Yes. uritemplate is a focused, well-maintained library with no dependencies, permissive licensing, and active development. Install it if you need RFC 6570 URI template expansion; it's the standard tool for this task in Python. No security vulnerabilities and suitable for production use.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- Low friction: pure Python, no runtime dependencies, distributed as a wheel.
- Actively maintained with recent commits and stable production status.
License · maintenance · safety
BSD 3-Clause OR Apache-2.0 (permissive) — Dual-licensed under BSD 3-Clause OR Apache-2.0 (permissive). Either license permits commercial and private use with minimal restrictions.
last release 2025-06-02 (438 days) · last repo commit 2026-08-10 · 246 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 185,307,638 downloads/mo, #223 on PyPI
Alternatives
Verify before relying
from uritemplate import URITemplate, expand
gist_uri = 'https://api.github.com/users/sigmavirus24/gists{/gist_id}'
t = URITemplate(gist_uri)
print(t.expand(gist_id='123456'))
# or
print(expand(gist_uri, gist_id='123456'))- Performance characteristics when handling very large templates or high-frequency expansions.
- Whether the package handles all edge cases defined in RFC 6570 (e.g., reserved expansion, list/dict serialization).
What it is and what it does
uritemplate is a Python implementation of RFC 6570 URI Templates, a standardized syntax for expressing URIs with variable placeholders. It provides two main interfaces: a URITemplate class for template objects that can be reused, and a module-level expand function for one-off expansions. The library parses template syntax like {/gist_id} or {?search,limit} and substitutes variables to produce concrete URIs.
The package has no runtime dependencies and is designed for efficiency—templates can be created once and reused many times, avoiding repeated parsing overhead. It's commonly used in REST API clients, web frameworks, and any code that needs to dynamically construct URIs from templates rather than string concatenation.
Use it for
- Build GitHub API URLs dynamically by expanding templates with user or repository identifiers.
- Construct parameterized REST API endpoints in HTTP client libraries or SDKs.
- Generate search or filter URLs with optional query parameters using RFC 6570 syntax.
- Create reusable URI patterns in web frameworks or API gateway configurations.
- Substitute path and query variables in hypermedia-driven applications following HATEOAS principles.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
uritemplate is a focused, well-maintained library with no dependencies, permissive licensing, and active development. Install it if you need RFC 6570 URI template expansion; it's the standard tool for this task in Python. No security vulnerabilities and suitable for production use.
Install
uritemplate on PyPI
Before you install
Low friction: pure Python, no runtime dependencies, distributed as a wheel. Actively maintained with recent commits and stable production status.
Requires Python 3.9 or later.
License in practice
Dual-licensed under BSD 3-Clause OR Apache-2.0 (permissive). Either license permits commercial and private use with minimal restrictions.
Quickstart
from uritemplate import URITemplate, expand
gist_uri = 'https://api.github.com/users/sigmavirus24/gists{/gist_id}'
t = URITemplate(gist_uri)
print(t.expand(gist_id='123456'))
# or
print(expand(gist_uri, gist_id='123456'))
Verify before relying
- Performance characteristics when handling very large templates or high-frequency expansions.
- Whether the package handles all edge cases defined in RFC 6570 (e.g., reserved expansion, list/dict serialization).
Package facts
| License | BSD 3-Clause OR Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 438 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 185,307,638 / month, #223 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: Implementation :: CPython |
Evidence: uritemplate-4.2.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “rfc 6570 implementation”
- uritemplateExpands RFC 6570 URI templates by substituting variable placeholders…
- std-uritemplateExpands RFC 6570 URI Templates (Level 4) by substituting variables…
- uri-templateExpands RFC 6570 URI Templates with variable substitution, supporting…
Give your agent the search over MCP, or paste the wish link into any chat.
Similar packages
Provides an immutable, chainable URL class for constructing, parsing, and manipulating URLs with a clean API, plus support for RFC 6570 URI template expansion.
Expands RFC 6570 URI Templates (Level 4) by substituting variables into template strings to generate URIs.
Expands RFC 6570 URI Templates with variable substitution, supporting extensions for nested structures, default values, partial expansion, and non-string value types.
However, do not adopt it if you need ongoing bug fixes, security patches, or support for future RFC revisions—the project is abandoned and will not receive updates.
Parse, manipulate, and generate URIs with a self-contained library that handles URI syntax and structure without external dependencies.
Install it if you need robust URI parsing and manipulation without external dependencies.
Provides RFC 3986 and RFC 3987 compliant regular expressions and utilities for parsing, validating, and resolving URIs and IRIs.
However, it is archived and unmaintained since 2018, so it will not receive bug fixes or Python compatibility updates.
Hyperlink provides an immutable, RFC 3986/3987-compliant URL class for parsing, manipulating, and constructing URIs and IRIs in pure Python.
Install it if you need RFC-compliant URL handling, especially for query parameters or relative URL resolution.
See also parameter-expansion-patched · uritools · rfc3986 · pytest-lazy-fixture