This was a small side-project done with web.py and Postgres a couple of years back. It has the following functionality
- Shorten any given URL
- Redirect to the URL
- Stats for the shortened URL
It should be easy to setup the database with the SQL files provided, or you can use the script
./loaddb.sh
You should be easily able to setup uWSGI for web.py and get the same running
Feel free to mail me at dipankarsarkar@gmail.com in case you need more help!