Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Simple URL Shortener

Project Description

A demo application for a very simple URL shortening service

The app relies on:



pip install url_shortener



python install


You can either modify the file or provide environment variables to configure url_shortener. The following environment variables can be tweaked:

  • REDIS_HOST: Address at which the redis server lives, defaults to
  • REDIS_PORT: Port on which to contact redis, defaults to 6379.
  • URL_PREFIX: URL scheme for your short url host
  • LISTEN_HOST: Address to bind to for the short url service
  • LISTEN_PORT: Port to bind to
  • RIEMANN_HOST: Address to use to contact riemann, defaults to
  • RIEMANN_PORT: Port to use to contact riemann, defaults to 5555
  • RIEMANN_PROTOCOL: Riemann protocol to use, defaults to UDP
  • LOG_FILE_PATH: Where to log, no defaults
  • LOG_LEVEL: level at which to log, defaults to DEBUG


When not run in debug mode, the application will output logs for consumption by logstash, using logstash_formatter


The service can simply be started by invoking: url-shortener, alternately deployments can be done with gunicorn. To start the service with gunicorn with 8 worker processes for instance, the following can be used:

gunicorn  -w 8 --log-file=/var/log/url-shortener/gunicorn.log --log-level=info url_shortener:app
Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
url_shortener-0.5.20.tar.gz (27.3 kB) Copy SHA256 Checksum SHA256 Source Apr 15, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting