Std.UriTemplate
0.0.54
See the version list below for details.
dotnet add package Std.UriTemplate --version 0.0.54
NuGet\Install-Package Std.UriTemplate -Version 0.0.54
<PackageReference Include="Std.UriTemplate" Version="0.0.54" />
<PackageVersion Include="Std.UriTemplate" Version="0.0.54" />
<PackageReference Include="Std.UriTemplate" />
paket add Std.UriTemplate --version 0.0.54
#r "nuget: Std.UriTemplate, 0.0.54"
#:package Std.UriTemplate@0.0.54
#addin nuget:?package=Std.UriTemplate&version=0.0.54
#tool nuget:?package=Std.UriTemplate&version=0.0.54
std-uritemplate
This is intended to become a complete and maintained cross-language implementation of the Uri Template specification RFC 6570 Level 4.
Available implementations
| Language | Complete | Reviewed | Published |
|---|---|---|---|
| Java | ✅ | ✅ | ✅ |
| Python | ✅ | ❌ | ✅ |
| Typescript | ✅ | ✅ | ✅ |
| Go | ✅ | ✅ | ✅ |
| C# | ✅ | ✅ | ✅ |
| Ruby | ✅ | ❌ | ✅ |
| PHP | ✅ | ✅ | ✅ |
| Swift | ✅ | ❌ | ✅ |
| Dart | ✅ | ❌ | ✅ |
Usage
Java
You can use the library as a Maven dependency:
<dependency>
<groupId>io.github.std-uritemplate</groupId>
<artifactId>std-uritemplate</artifactId>
<version>REPLACE-ME</version>
</dependency>
in Gradle:
implementation 'io.github.std-uritemplate:std-uritemplate:REPLACE-ME'
and use it in your project:
import io.github.stduritemplate.StdUriTemplate;
...
StdUriTemplate.expand(template, substitutions);
Python
Install the package with pip (or any alternative):
pip install std-uritemplate
Use the library in your project:
from stduritemplate import StdUriTemplate
...
StdUriTemplate.expand(template, substitutions)
Typescript/Javascript
Install the package using npm:
npm i @std-uritemplate/std-uritemplate
Use the package:
const { StdUriTemplate } = require('@std-uritemplate/std-uritemplate');
...
StdUriTemplate.expand(template, substitutions);
Go
Install the package:
go get github.com/std-uritemplate/std-uritemplate/go
and use it:
import stduritemplate "github.com/std-uritemplate/std-uritemplate/go"
...
stduritemplate.Expand(template, substitutions)
C#
Install the package:
dotnet add package Std.UriTemplate
and use it:
Std.UriTemplate.Expand(template, substitutions);
Ruby
Install the package:
gem install stduritemplate
and use it:
require 'stduritemplate'
...
StdUriTemplate.expand(template, substitutions)
PHP
Install the package:
composer require stduritemplate/stduritemplate
and use it:
use StdUriTemplate\StdUriTemplate;
...
StdUriTemplate::expand($template, $substitutions);
Swift
Install the package, adding to Package.swift:
let package = Package(
...
dependencies: [
...
.package(
url: "https://github.com/std-uritemplate/std-uritemplate-swift.git",
from: "<version>"
)
],
targets: [
.executableTarget(
...
dependencies: [
...
.product(name: "stduritemplate",
package: "std-uritemplate-swift")
]
...
),
]
)
and use it:
import stduritemplate
...
StdUriTemplate.expand(template, substitutions: substs)
Dart
Install the package:
dart pub add std_uritemplate
for flutter:
flutter pub add std_uritemplate
and use it:
import 'package:std_uritemplate/std_uritemplate.dart';
void main() {
final template = 'https://example.com/{var}';
final substitutions = {'var': 'value'};
print(StdUriTemplate.expand(template, substitutions));
}
Design decisions
We have a set of design decisions to guide:
- zero dependencies
- no usage of regexp
- no options/configurations
- only single expansion will be supported
- single method public API
- no language idiomatic API, only 1 low level primitive - we do encourage language-specific wrapper/alternative libraries
- portable implementation across languages based on widely available patterns
- target Level support is 4 (should pass all the canonical tests)
- favor maintenance and readability
- performance until they compromise readability
- one implementation per ecosystem/runtime (e.g. 1 implementation in Java and no Kotlin/Scala/Closure, 1 in TS that will serve JS as well etc.)
- substitutions will be performed for primitive types and date-time
API
The public API is composed by a single method(in Java for simplicity):
String expand(String template, Map<String, Object> substitutions)
all the rest, should not be directly accessible.
Motivation
<img alt="alt_text" src="https://imgs.xkcd.com/comics/dependency.png" />
In the Kiota project they are using Uri Templates to build URLs, and we have already spent enough life-time dealing with:
- unmaintained projects
- scarce feedback from maintainers
- long release cycles
- different nuances in different implementations
- quirks and integration issues
- frameworks and additional dependencies
- diamond transitive dependencies
We aim to do it differently, by reducing maintenance to a minimum by automating it, and sharing responsibilities to reduce the bus/truck factor:
- single repository
- multiple implementations
- fully automated testing standardized
- fully automated releases on tag
- same tradeoffs across languages
- familiar implementation across languages
- multiple maintainers in an independent organization
Uri Template is(likely) going to be included in the next OpenAPI specification and we need to rely on a (more) solid foundation to prevent our selves to spend long, tedious hours and days chasing hidden bugs, verifying compatibilities and waiting for unresponsive maintainers.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
-
net5.0
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Std.UriTemplate:
| Package | Downloads |
|---|---|
|
Microsoft.Kiota.Abstractions
Abstractions library for the Kiota generated SDKs in dotnet. |
|
|
ReQuesty.Runtime
Package Description |
|
|
Devlooped.Sponsors.Commands
Commands used by the dotnet-sponsor CLI to manage sponsorship manifests. |
GitHub repositories (3)
Showing the top 3 popular GitHub repositories that depend on Std.UriTemplate:
| Repository | Stars |
|---|---|
|
netwrix/pingcastle
PingCastle - Get Active Directory Security at 80% in 20% of the time
|
|
|
Kyrodan/KeeAnywhere
A cloud storage provider plugin for KeePass Password Safe
|
|
|
Syslifters/offsec-tools
Compiled tools for internal assessments
|
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.8 | 14,302 | 10/16/2025 |
| 2.0.7 | 364 | 10/16/2025 |
| 2.0.6 | 12,176 | 9/30/2025 |
| 2.0.5 | 1,457,148 | 5/14/2025 |
| 2.0.4 | 1,286 | 5/14/2025 |
| 2.0.3 | 93,416 | 2/7/2025 |
| 2.0.2 | 2,527 | 2/6/2025 |
| 2.0.1 | 22,070,264 | 11/12/2024 |
| 2.0.0 | 757,702 | 9/30/2024 |
| 1.0.6 | 6,202,557 | 8/30/2024 |
| 1.0.5 | 949,159 | 7/24/2024 |
| 1.0.3 | 360,465 | 7/3/2024 |
| 1.0.2 | 6,856 | 6/26/2024 |
| 1.0.1 | 281,803 | 6/11/2024 |
| 1.0.0 | 1,307 | 6/11/2024 |
| 0.0.59 | 2,821 | 6/7/2024 |
| 0.0.58 | 1,164 | 6/7/2024 |
| 0.0.57 | 9,707,095 | 4/18/2024 |
| 0.0.56 | 73,422 | 4/11/2024 |
| 0.0.55 | 2,250,920 | 3/18/2024 |
| 0.0.54 | 925,856 | 2/27/2024 |
| 0.0.53 | 243,367 | 2/15/2024 |
| 0.0.52 | 3,696 | 2/9/2024 |
| 0.0.50 | 6,418,237 | 1/8/2024 |
| 0.0.49 | 9,120 | 12/12/2023 |
| 0.0.48 | 127,037 | 11/29/2023 |
| 0.0.47 | 4,724 | 11/20/2023 |
| 0.0.46 | 3,969,261 | 10/19/2023 |
| 0.0.45 | 1,171 | 10/19/2023 |
| 0.0.44 | 1,954 | 10/17/2023 |
| 0.0.43 | 3,067 | 10/12/2023 |
| 0.0.42 | 91,765 | 9/20/2023 |
| 0.0.41 | 1,130 | 9/19/2023 |
| 0.0.40 | 1,197 | 9/7/2023 |
| 0.0.39 | 2,361 | 9/6/2023 |
| 0.0.38 | 2,278 | 9/4/2023 |
| 0.0.36 | 2,360 | 9/4/2023 |
| 0.0.35 | 2,306 | 9/4/2023 |
| 0.0.34 | 2,300 | 9/4/2023 |
| 0.0.32 | 2,333 | 9/4/2023 |
| 0.0.31 | 2,330 | 8/31/2023 |
| 0.0.30 | 2,332 | 8/31/2023 |
| 0.0.15 | 2,340 | 8/30/2023 |
| 0.0.14 | 2,359 | 8/29/2023 |
| 0.0.13 | 2,543 | 8/29/2023 |