uritemplate
uritemplate copied to clipboard
URI template parsing per RFC6570
Closes #33
I noticed the implementation allows specifying default values in the template, which is cool, but is not supported by the RFC. Maybe this feature should be added to the RFC?
The RFC limits the characters allowed in variables names, but there is no validation enforcing this. From § 2.3: variable-list = varspec *( "," varspec ) varspec = varname [...
As shown in an example [here](https://msdn.microsoft.com/en-us/library/system.uritemplate.match%28v=vs.110%29.aspx), it would be nice given uri template to match a fully expanded uri. For example given uri template ``` http://localhost/weather/{state}/{city}?forecast={day} ``` and ``` http://localhost/weather/Washington/Redmond?forecast=today...
Let's look at a template like this: ``` http://example.com/dictionary/{term:1} ``` We have two different behaviours depending upon the value used to expand `term`. ```py >>> import uritemplate >>> u =...
Hi! Would you consider an API to validate whether a particular input was valid under RFC 6570 (or does such a thing exist already and I've missed it)? E.g., `http://example.com/dictionary/{term:1}/{term`...
i.e. given a URI and a template? does the URI match the template? This would be a useful feature
updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v5.0.0) - [github.com/asottile/reorder-python-imports: v3.12.0 → v3.14.0](https://github.com/asottile/reorder-python-imports/compare/v3.12.0...v3.14.0) - [github.com/psf/black: 23.12.1 → 24.10.0](https://github.com/psf/black/compare/23.12.1...24.10.0) - [github.com/asottile/pyupgrade: v3.15.0 → v3.18.0](https://github.com/asottile/pyupgrade/compare/v3.15.0...v3.18.0) - [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.11.2](https://github.com/pre-commit/mirrors-mypy/compare/v1.8.0...v1.11.2) - [github.com/asottile/setup-cfg-fmt: v2.5.0 →...