A tiny application that handles (cool) uri's.
This very simple application is meant to be the handler on a domain that handles Cool Uri’s (http://www.w3.org/TR/cooluris/) with 303 redirects.
All it does is map Uri’s to other uri’s and redirect them. To make thing easy
you can either redirect by hitting the full URI (eg.
http://id.example.com/foo/15) or by querying a handle service (eg.
http://id.example.com/handle?uri=http://id.example.com/foo/15). Both of these
will redirect you. The handle service also works for non-http URI’s. Finally,
there’s a service that just returns information without performing a redirect,
http://id.example.com/uris?uri=http://id.example.com/foo/15. This can be
handy to bypass some of the strangeness that happens when you combine Cool uri’s
with CORS and custom HTTP headers.
Configuration is done by editing a YAML file. For each URI you need to register
a regex and a redirect template. The regex should use named placeholders, as
well as the redirect string. An optional argument
mount determines if your
match is living at the server root or is absolute (eg. because it’s a URN). Not
mount sets it to
- Added http caching to the
- Added a
/urisendpoint that does not redirect, but just returns information.
- Initial version
- Allows redirecting a a regular URI and with a query service.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash SHA256 hash help||File type||Python version||Upload date|
|urihandler-0.3.0-py2.py3-none-any.whl (7.3 kB) Copy SHA256 hash SHA256||Wheel||2.7||Apr 12, 2016|
|urihandler-0.3.0.tar.gz (5.6 kB) Copy SHA256 hash SHA256||Source||None||Apr 12, 2016|