Coder Social home page Coder Social logo

url-shortener's Introduction

url-shortener

This service can generate the shortened url for a supplied long-url and can return long-url for the supplied shortened url.

Tech Stack

  • This service utilizes an external service called Bitly
  • Bitly is used to shorten an url or look up a short-url and find the long-url.
  • This API service is built using:
    • Python3
    • Flask
    • PyShorteners

Installation Instructions

This service uses pipenv to install dependencies. Below are the instructions:

# Clone the repo
git clone [email protected]:gitstercode/url-shortener.git
cd url-shortener

# Install dependencies
pipenv install
pipenv shell

# Run the service
python3 shoretner.py

Note: If pipenv doesn't exist, then install it with pip thats compiled with python3

pip3 install pipenv

API Documentation

  • /shortify - Takes the long-url and returns the short-url

      curl -X GET http://localhost:<port>/shortify?url=<long url>
    
  • /longify - Takes the short-url and returns the original long-url

      curl -X GET http://localhost:<port>/longify?url=<shortened url>
    
  • / - Returns the site-map

      curl -X GET http://localhost:<port>/
    

Files:

  • Pipfile - Dependencies listed
  • Pipfile.lock - Auto-Generated by pipenv
  • shortener.py - Application entrypoint

url-shortener's People

Contributors

gitstercode avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.