Skip to main content

A tiny application that handles (cool) uri's.

Project description

https://badge.fury.io/py/urihandler.png https://travis-ci.org/OnroerendErfgoed/urihandler.png?branch=master https://coveralls.io/repos/OnroerendErfgoed/urihandler/badge.png?branch=master

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.

1.0.0 (06-07-2022)

  • Drop python 2 support (#80)

  • Update to pyramid 2 (#78)

  • Update dependencies (#77)

  • Is setup.cfg still needed? (#76)

  • Drop pyup support (#75)

  • Which HTTP methods does the “redirect” route support? (#73)

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

urihandler-1.0.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

urihandler-1.0.0-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file urihandler-1.0.0.tar.gz.

File metadata

  • Download URL: urihandler-1.0.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.6

File hashes

Hashes for urihandler-1.0.0.tar.gz
Algorithm Hash digest
SHA256 79e4f0cd42319ae12394f5e7cbf71da18481ec2245071eff14621514a5db72e4
MD5 dcde5bfa46daee119e652e8c0f220301
BLAKE2b-256 4c9a9c7884500337e3bf7afcccf48e19e60e7f79933c40f6f2fc8f44e8e10a8e

See more details on using hashes here.

File details

Details for the file urihandler-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: urihandler-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.6

File hashes

Hashes for urihandler-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca045a4c07f5018094f84b5ed6a1c091110b6f16cb95cb23865e4be9eeca6407
MD5 e4a601c2fad3433d3101803e421e6989
BLAKE2b-256 0dd134e30a293a85425a9b6061f378eeff4649cdb050e69c087a3f915582eca0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page