Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!


Shorty - URL shortner

The Project

Shorty is a project developed during the internship at Evonove of a student from the University of Perugia. The overall concept is to make short links containing the hostname of the destination URL, following this scheme:

This approach helps avoiding several problems suffered by url shortners in general, in particular Shorty may avoid:

  • Rickrolling
  • Phishing attempts
  • Neutralizing School or family content filters based on URLstring contents

As a drawback, links produced with Shorty are a little bit longer than usual, which in most cases is not a blocking issue. Anyway, to keep urls as short as possible, for some, well-known hostnames, Shorty inserts a friendly alias instead of the full hostname for the destination URL, e.g.:


Shorty is completely written in Python and targets the Google AppEngine platform. Core functionalities are wrapped into a RESTful API which is also used in the web frontend through Ajax calls. Users can access the API through any HTTP tool they prefer.

API Documentation


  • Method: POST
  • URL: /api/short/:long_url
  • Params:
  • long_url: the url to short. If the url has no URL scheme it defaults to http://
  • Returns: Shorted url in JSON format


  • Method: GET
  • URL /api/expand/:url
  • Params:
  • url: shorted url to expand
  • Returns: Original url in JSON format

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.