Std.UriTemplate 2.0.11
std-uritemplate
This is a complete and maintained cross-language implementation of the Uri Template specification RFC 6570 Level 4.
Note
Low activity is this repository is expected as long as there are no outstanding bug reports the implementations are considered stable and mature.
Available implementations
| Language | Complete | Reviewed | Published |
|---|---|---|---|
| Java | ✅ | ✅ | ✅ |
| Python | ✅ | ❌ | ✅ |
| Typescript | ✅ | ✅ | ✅ |
| Go | ✅ | ✅ | ✅ |
| C# | ✅ | ✅ | ✅ |
| Ruby | ✅ | ❌ | ✅ |
| PHP | ✅ | ✅ | ✅ |
| Swift | ✅ | ❌ | ✅ |
| Dart | ✅ | ✅ | ✅ |
| Rust | ✅ | ❌ | ✅ |
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/v2
and use it:
import stduritemplate "github.com/std-uritemplate/std-uritemplate/go/v2"
...
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';
...
print(StdUriTemplate.expand(template, substitutions));
Rust
Add the dependency to your Cargo.toml:
[dependencies]
std-uritemplate = "REPLACE-ME"
and use it:
use stduritemplate::{expand, Value};
use std::collections::HashMap;
...
let mut substitutions = HashMap::new();
substitutions.insert("var".to_string(), Value::String("value".to_string()));
let result = expand(template, &substitutions).unwrap();
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 only for primitive types
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
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.
Showing the top 20 packages that depend on Std.UriTemplate.
| Packages | Downloads |
|---|---|
|
Microsoft.Kiota.Abstractions
Abstractions library for the Kiota generated SDKs in dotnet.
|
8 |
|
Microsoft.Kiota.Abstractions
Abstractions library for the Kiota generated SDKs in dotnet.
|
7 |
|
Microsoft.Kiota.Abstractions
Abstractions library for the Kiota generated SDKs in dotnet.
|
6 |
2.0.11 - 2026-07-06
2.0.10 - 2026-05-20
What's Changed
Other Changes
- Release fixes by @andreaTP in #487 Full Changelog: https://github.com/std-uritemplate/std-uritemplate/compare/v2.0.9...2.0.10 [Changes][2.0.10]
2.0.9 - 2026-05-20
What's Changed
Other Changes
- automerge minor version updates by @andreaTP in #411
- ci: switches to sdkman for jbang install by @baywet in #417
- chore: fix Maven badge by @andreaTP in #458
- Remove unused black by @andreaTP in #463
- feat: completed the rust impl of std-uritemplate by @Gmin2 in #468
Dependencies 📦
- build(deps): bump dependabot/fetch-metadata from 2.2.0 to 2.4.0 by @dependabot[bot] in #391
- build(deps): bump actions/setup-dotnet from 4 to 5 by @dependabot[bot] in #390
- build(deps): bump actions/setup-node from 4 to 6 by @dependabot[bot] in #394
- build(deps): bump actions/checkout from 4 to 5 by @dependabot[bot] in #392
- build(deps): bump github.com/std-uritemplate/std-uritemplate/go/v2 from 2.0.6 to 2.0.8 in /go by @dependabot[bot] in #397
- build(deps): bump actions/setup-java from 4 to 5 by @dependabot[bot] in #400
- build(deps): bump actions/setup-go from 5 to 6 by @dependabot[bot] in #399
- build(deps-dev): bump org.junit.jupiter:junit-jupiter from 5.13.4 to 5.14.0 in /java by @dependabot[bot] in #401
- build(deps-dev): bump puppeteer from 24.25.0 to 24.26.0 in /typescript by @dependabot[bot] in #402
- build(deps-dev): bump puppeteer from 24.26.0 to 24.26.1 in /typescript by @dependabot[bot] in #403
- build(deps): bump actions/download-artifact from 5 to 6 by @dependabot[bot] in #405
- build(deps): bump actions/upload-artifact from 4 to 5 by @dependabot[bot] in #404
- build(deps-dev): bump puppeteer from 24.26.1 to 24.27.0 in /typescript by @dependabot[bot] in #406
- build(deps-dev): bump rimraf from 6.0.1 to 6.1.0 in /typescript by @dependabot[bot] in #407
- build(deps-dev): bump org.junit.jupiter:junit-jupiter from 5.14.0 to 5.14.1 in /java by @dependabot[bot] in #408
- build(deps-dev): bump puppeteer from 24.27.0 to 24.28.0 in /typescript by @dependabot[bot] in #409
- build(deps-dev): bump puppeteer from 24.28.0 to 24.29.0 in /typescript by @dependabot[bot] in #410
- build(deps-dev): bump puppeteer from 24.29.0 to 24.29.1 in /typescript by @dependabot[bot] in #412
- build(deps): bump csharp from
777fd87to2f49f01by @dependabot[bot] in #413 - build(deps-dev): bump puppeteer from 24.29.1 to 24.30.0 in /typescript by @dependabot[bot] in #414
- build(deps-dev): bump js-yaml from 4.1.0 to 4.1.1 in /typescript by @dependabot[bot] in #415
- build(deps-dev): bump glob from 11.0.3 to 11.1.0 in /typescript by @dependabot[bot] in #416
- build(deps-dev): bump rimraf from 6.1.0 to 6.1.2 in /typescript by @dependabot[bot] in #418
- build(deps-dev): bump puppeteer from 24.30.0 to 24.31.0 in /typescript by @dependabot[bot] in #420
- build(deps): bump actions/checkout from 5 to 6 by @dependabot[bot] in #419
- build(deps): bump csharp from
2f49f01to1ae4872by @dependabot[bot] in #421 - build(deps): bump org.apache.maven.plugins:maven-source-plugin from 3.3.1 to 3.4.0 in /java by @dependabot[bot] in #422
- build(deps-dev): bump puppeteer from 24.31.0 to 24.32.0 in /typescript by @dependabot[bot] in #423
- build(deps-dev): bump puppeteer from 24.32.0 to 24.32.1 in /typescript by @dependabot[bot] in #424
- build(deps): bump csharp from
1ae4872to6aa6835by @dependabot[bot] in #425 - build(deps-dev): bump puppeteer from 24.32.1 to 24.33.0 in /typescript by @dependabot[bot] in #426
- build(deps): bump actions/upload-artifact from 5 to 6 by @dependabot[bot] in #428
- build(deps): bump actions/download-artifact from 6 to 7 by @dependabot[bot] in #427
- build(deps-dev): bump puppeteer from 24.33.0 to 24.33.1 in /typescript by @dependabot[bot] in #429
- build(deps-dev): bump puppeteer from 24.33.1 to 24.34.0 in /typescript by @dependabot[bot] in #430
- build(deps): bump dependabot/fetch-metadata from 2.4.0 to 2.5.0 by @dependabot[bot] in #431
- build(deps-dev): bump org.junit.jupiter:junit-jupiter from 5.14.1 to 5.14.2 in /java by @dependabot[bot] in #433
- build(deps): bump csharp from
6aa6835toc9517d0by @dependabot[bot] in #432 - build(deps): bump org.sonatype.central:central-publishing-maven-plugin from 0.9.0 to 0.10.0 in /java by @dependabot[bot] in #434
- build(deps-dev): bump puppeteer from 24.34.0 to 24.35.0 in /typescript by @dependabot[bot] in #435
- build(deps): bump csharp from
c9517d0to362cdecby @dependabot[bot] in #436 - build(deps-dev): bump puppeteer from 24.35.0 to 24.36.0 in /typescript by @dependabot[bot] in #437
- build(deps-dev): bump puppeteer from 24.36.0 to 24.36.1 in /typescript by @dependabot[bot] in #438
- build(deps-dev): bump org.apache.maven.plugins:maven-compiler-plugin from 3.14.1 to 3.15.0 in /java by @dependabot[bot] in #439
- build(deps-dev): bump puppeteer from 24.36.1 to 24.37.1 in /typescript by @dependabot[bot] in #441
- build(deps): bump csharp from
362cdecto5b4929eby @dependabot[bot] in #440 - build(deps-dev): bump puppeteer from 24.37.1 to 24.37.2 in /typescript by @dependabot[bot] in #442
- build(deps): bump csharp from
5b4929eto036db59by @dependabot[bot] in #443 - build(deps-dev): bump org.junit.jupiter:junit-jupiter from 5.14.2 to 5.14.3 in /java by @dependabot[bot] in #444
- build(deps-dev): bump rimraf from 6.1.2 to 6.1.3 in /typescript by @dependabot[bot] in #445
- build(deps-dev): bump puppeteer from 24.37.2 to 24.37.3 in /typescript by @dependabot[bot] in #446
- build(deps-dev): bump puppeteer from 24.37.3 to 24.37.4 in /typescript by @dependabot[bot] in #447
- build(deps-dev): bump puppeteer from 24.37.4 to 24.37.5 in /typescript by @dependabot[bot] in #448
- build(deps-dev): bump basic-ftp from 5.1.0 to 5.2.0 in /typescript by @dependabot[bot] in #449
- build(deps-dev): bump rollup from 4.46.2 to 4.59.0 in /typescript by @dependabot[bot] in #450
- build(deps): bump actions/upload-artifact from 6 to 7 by @dependabot[bot] in #451
- build(deps-dev): bump minimatch from 10.2.0 to 10.2.4 in /typescript by @dependabot[bot] in #453
- build(deps): bump actions/download-artifact from 7 to 8 by @dependabot[bot] in #452
- build(deps-dev): bump svgo from 3.3.2 to 3.3.3 in /typescript by @dependabot[bot] in #454
- build(deps-dev): bump puppeteer from 24.37.5 to 24.38.0 in /typescript by @dependabot[bot] in #455
- build(deps-dev): bump puppeteer from 24.38.0 to 24.39.0 in /typescript by @dependabot[bot] in #456
- build(deps): bump csharp from
036db59tof289594by @dependabot[bot] in #457 - build(deps-dev): bump puppeteer from 24.39.0 to 24.39.1 in /typescript by @dependabot[bot] in #460
- build(deps): bump csharp from
f289594to33d531fby @dependabot[bot] in #459 - build(deps-dev): bump puppeteer from 24.39.1 to 24.40.0 in /typescript by @dependabot[bot] in #461
- build(deps-dev): bump typescript from 5.9.3 to 6.0.2 in /typescript by @dependabot[bot] in #462
- build(deps-dev): bump picomatch from 4.0.2 to 4.0.4 in /typescript by @dependabot[bot] in #464
- build(deps): bump dependabot/fetch-metadata from 2.5.0 to 3.0.0 by @dependabot[bot] in #465
- build(deps): bump csharp from
33d531fto3521142by @dependabot[bot] in #466 - build(deps-dev): bump defu from 6.1.4 to 6.1.6 in /typescript by @dependabot[bot] in #467
- build(deps-dev): bump basic-ftp from 5.2.0 to 5.2.1 in /typescript by @dependabot[bot] in #469
- build(deps-dev): bump basic-ftp from 5.2.1 to 5.2.2 in /typescript by @dependabot[bot] in #470
- build(deps): bump softprops/action-gh-release from 2 to 3 by @dependabot[bot] in #471
- build(deps-dev): bump puppeteer from 24.40.0 to 24.41.0 in /typescript by @dependabot[bot] in #473
- build(deps): bump csharp from
3521142to5f50802by @dependabot[bot] in #472 - build(deps-dev): bump typescript from 6.0.2 to 6.0.3 in /typescript by @dependabot[bot] in #474
- build(deps): bump dependabot/fetch-metadata from 3.0.0 to 3.1.0 by @dependabot[bot] in #475
- build(deps-dev): bump puppeteer from 24.41.0 to 24.42.0 in /typescript by @dependabot[bot] in #477
- build(deps): bump csharp from
5f50802to2255a6aby @dependabot[bot] in #476 - build(deps): bump csharp from
2255a6atof90d11dby @dependabot[bot] in #478 - build(deps-dev): bump org.junit.jupiter:junit-jupiter from 5.14.3 to 5.14.4 in /java by @dependabot[bot] in #479
- build(deps-dev): bump postcss from 8.5.3 to 8.5.12 in /typescript by @dependabot[bot] in #480
- build(deps-dev): bump ip-address from 10.1.0 to 10.2.0 in /typescript by @dependabot[bot] in #481
- build(deps-dev): bump puppeteer from 24.42.0 to 24.43.0 in /typescript by @dependabot[bot] in #482
- build(deps-dev): bump puppeteer from 24.43.0 to 24.43.1 in /typescript by @dependabot[bot] in #483
- build(deps): bump csharp from
f90d11dto0013db7by @dependabot[bot] in #484 - build(deps-dev): bump puppeteer from 24.43.1 to 25.0.2 in /typescript by @dependabot[bot] in #485
- build(deps-dev): bump puppeteer from 25.0.2 to 25.0.4 in /typescript by @dependabot[bot] in #486
New Contributors
- @Gmin2 made their first contribution in #468 Full Changelog: https://github.com/std-uritemplate/std-uritemplate/compare/v2.0.8...2.0.9 [Changes][2.0.9]
2.0.8 - 2025-10-16
2.0.7 - 2025-10-16
2.0.6 - 2025-09-30
2.0.5 - 2025-05-14
2.0.4 - 2025-05-14
2.0.3 - 2025-02-07
2.0.2 - 2025-02-06
2.0.1 - 2024-11-12
2.0.0 - 2024-09-30
1.0.6 - 2024-08-30
1.0.5 - 2024-07-24
[Changes][1.0.5] [2.0.11]: https://github.com/std-uritemplate/std-uritemplate/compare/2.0.10...2.0.11 [2.0.10]: https://github.com/std-uritemplate/std-uritemplate/compare/2.0.9...2.0.10 [2.0.9]: https://github.com/std-uritemplate/std-uritemplate/compare/2.0.8...2.0.9 [2.0.8]: https://github.com/std-uritemplate/std-uritemplate/compare/2.0.7...2.0.8 [2.0.7]: https://github.com/std-uritemplate/std-uritemplate/compare/2.0.6...2.0.7 [2.0.6]: https://github.com/std-uritemplate/std-uritemplate/compare/2.0.5...2.0.6 [2.0.5]: https://github.com/std-uritemplate/std-uritemplate/compare/2.0.4...2.0.5 [2.0.4]: https://github.com/std-uritemplate/std-uritemplate/compare/2.0.3...2.0.4 [2.0.3]: https://github.com/std-uritemplate/std-uritemplate/compare/2.0.2...2.0.3 [2.0.2]: https://github.com/std-uritemplate/std-uritemplate/compare/2.0.1...2.0.2 [2.0.1]: https://github.com/std-uritemplate/std-uritemplate/compare/2.0.0...2.0.1 [2.0.0]: https://github.com/std-uritemplate/std-uritemplate/compare/1.0.6...2.0.0 [1.0.6]: https://github.com/std-uritemplate/std-uritemplate/compare/1.0.5...1.0.6 [1.0.5]: https://github.com/std-uritemplate/std-uritemplate/tree/1.0.5
.NET 8.0
- No dependencies.
.NET Standard 2.0
- No dependencies.
| Version | Downloads | Last updated |
|---|---|---|
| 2.0.12 | 2 | 07/20/2026 |
| 2.0.11 | 1 | 07/20/2026 |
| 2.0.10 | 6 | 05/26/2026 |
| 2.0.9 | 6 | 05/26/2026 |
| 2.0.8 | 13 | 12/09/2025 |
| 2.0.7 | 14 | 12/10/2025 |
| 2.0.6 | 14 | 12/10/2025 |
| 2.0.5 | 14 | 12/10/2025 |
| 2.0.4 | 14 | 12/10/2025 |
| 2.0.3 | 13 | 12/10/2025 |
| 2.0.2 | 14 | 12/10/2025 |
| 2.0.1 | 14 | 12/10/2025 |
| 2.0.0 | 13 | 12/10/2025 |
| 1.0.6 | 14 | 12/10/2025 |
| 1.0.5 | 14 | 12/10/2025 |
| 1.0.3 | 14 | 12/10/2025 |
| 1.0.2 | 14 | 12/10/2025 |
| 1.0.1 | 14 | 12/10/2025 |
| 1.0.0 | 14 | 12/10/2025 |
| 0.0.59 | 14 | 12/10/2025 |
| 0.0.58 | 14 | 12/10/2025 |
| 0.0.57 | 15 | 12/10/2025 |
| 0.0.56 | 14 | 12/10/2025 |
| 0.0.55 | 14 | 12/10/2025 |
| 0.0.54 | 14 | 12/10/2025 |
| 0.0.53 | 14 | 12/10/2025 |
| 0.0.52 | 12 | 12/10/2025 |
| 0.0.50 | 14 | 12/10/2025 |
| 0.0.49 | 14 | 12/10/2025 |
| 0.0.48 | 14 | 12/10/2025 |
| 0.0.47 | 14 | 12/10/2025 |
| 0.0.46 | 14 | 12/10/2025 |
| 0.0.45 | 14 | 12/10/2025 |
| 0.0.44 | 14 | 12/10/2025 |
| 0.0.43 | 14 | 12/10/2025 |
| 0.0.42 | 14 | 12/10/2025 |
| 0.0.41 | 14 | 12/10/2025 |
| 0.0.40 | 14 | 12/10/2025 |
| 0.0.39 | 14 | 12/10/2025 |
| 0.0.38 | 11 | 01/21/2026 |
| 0.0.36 | 11 | 01/21/2026 |
| 0.0.35 | 11 | 01/21/2026 |
| 0.0.34 | 11 | 01/21/2026 |
| 0.0.32 | 11 | 01/21/2026 |
| 0.0.31 | 11 | 01/21/2026 |
| 0.0.30 | 11 | 01/21/2026 |
| 0.0.15 | 11 | 01/21/2026 |
| 0.0.14 | 11 | 01/21/2026 |
| 0.0.13 | 11 | 01/21/2026 |
