A tiny application that handles (cool) uri's.
Project description
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, eg. 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 setting mount sets it to True.
0.4.0 (07-12-2020)
Py3 migratie (#53)
0.3.0 (12-04-2016)
Added http caching to the /uris endpoint.
0.2.0 (28-09-2015)
Added a /uris endpoint that does not redirect, but just returns information.
0.1.0 (27-09-2015)
Initial version
Allows redirecting a a regular URI and with a query service.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file urihandler-0.4.0.tar.gz
.
File metadata
- Download URL: urihandler-0.4.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/2.7.15rc1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 382a7f254f7132f32e51c36ca3643aa444cd38351d4d410988cd99284086a8e0 |
|
MD5 | 362c332f90300fe18100afd7f836e08c |
|
BLAKE2b-256 | 9c1ef2d4a989837132fadf6364fc6301e190021fb8efd57b31c2f0bf700aa551 |
File details
Details for the file urihandler-0.4.0-py2.py3-none-any.whl
.
File metadata
- Download URL: urihandler-0.4.0-py2.py3-none-any.whl
- Upload date:
- Size: 17.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/2.7.15rc1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11cfc282ed5c1d224ca1d2d525475e3b2f6915dba4b03b7e90b57cfb689f2366 |
|
MD5 | 45e701642f969c4b30d6f82f803a7198 |
|
BLAKE2b-256 | 56e40206222c368d6e2facb9b86422fc65eedb34d4f9c90f0dd413e1996db3b9 |