Skip to content

PradheepShrinivasan/picourl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PicoURL

Coverage Status Code Health

A PicoURL is a URL shortener written in python using Flask and pymongo.

The code contains unit tests for all modules and also integration tests for all RESTful endpoints.

Picourl supports the following

1. Creating short urls anonymously
2. Login support for users.
3. Shows users 7 most clicked urls.

Installation

  1. To install the application clone the application using

        git clone https://github.com/PradheepShrinivasan/picourl.git
    
  2. Install the required python dependencies using

        pip install requirements.txt
    
  3. Install mongodb using the following commands as mentioned in mongodb documentation

Configuration

Picourl allows configuration of the following variables in config.py

PORT              - the port to listen to(default 5000)
CONNECTION_STRING - the mongodb string to connect(default is mongodb://localhost:27017/)
SITE_URL          - the site prefix in url shortener (default is localhost)

Starting application

To run the application go to the cloned folder and run it using

```
    flask run
```

if you have used the default configuration the system must be listening in port 5000 and you can access it by using http://localhost:5000

The application screen should something like below

image

And logged in page looks like below

image

one can look at the site hosted at heroku http://picourl.herokuapp.com/

Documentation

The discussion on design and configuration are available in blog post 1,2,3 4

Releases

0.4 - Updated to the latest version of python and dependencies

0.3 - Added support to show the users clicked 7 urls.

0.2 - Added UI and form validation using csrf tokens.

0.1 - Basic working code with storage to backend mongodb and redirect on using shortURL

LICENCE

The software is provided in BSD licence, see LICENCE file for more details.