python3 flask based python-url-shortener microservice.

Overview

python-url-shortener

This repository is for managing all public/private entity specific api endpoints for an organisation. In this case we have entity as URL shortener

Project Structure

The basic project structure is as follows:

root/
 |-- app
 |   |-- controllers/
 |   |   |-- __init__.py
 |   |   |-- url_shortener_controller.py
 |   |-- services/
 |   |   |-- __init__.py
 |   |   |-- url_shortener_service.py
 |   |-- schemas/
 |   |   |-- __init__.py
 |   |   |-- url_shortener_schema.py
 |   |-- utilities/
 |   |   |-- __init__.py
 |   |   |-- url_shortener_utility.py
 |   |-- tests/
 |   |   |-- __init__.py
 |   |   |-- test_url_shortener_controller.py
 |   |   |-- test_url_shortener_utility.py
 |   |-- config.py
 |   |-- errors.py
 |   |-- routes.py
 |   |-- __init__.py
 |   build.sh
 |   logging.yaml
 |   setup.py
 |   README.md

Synopsis

There are two API endpoints exposed as part of this app
1. /url/encode
2. /url/decode

/url/encode:  Will shorten a valid URL and returns a shorten URL(JSON) also 
put origianl, shorten url in cache(We are using flask_caching for storage).

/url/decode:  Will return a valid URL original URL(JSON) for a given shorten 
url from cache(We are using flask_caching for storage).

For request/response structure please reffer 
Swagger URl after successful buld & run step.

Requirements

python 3.9
Flask 2.0.2
marshmallow 3.12.2
flask_caching
Werkzeug 2.0.2

for detiled requirement please reffer setup.py

Quick Start Setup

Run Setup.

This will create virtualenv and install all required packages and will allow you to run the app from anywhere on your machine.

$> cd the-shortest-url-1-uvpyns
$> ./build.sh

Run the tests

$> cd the-shortest-url-1-uvpyns
$> pytest

Running Locally

API can be executed as follows:

$> cd the-shortest-url-1-uvpyns
$> python api_gateway.py

Navigate to the posted URL in your terminal to be greeted with Swagger, where you can run the API endpoints.

Owner
Asutosh Parida
Love to work on Data.
Asutosh Parida
Qysqa - URL shortener website with python

Qysqa - shorten your URL. ~ A simple URL-shortening website. how do you pronounc

Dastan Ozgeldi 0 Nov 18, 2022
Use this module to detect if a URL is on discord's phishing list.

PhishDetector This module was made so you can check a URL and see if it's in discord's official list of phishing and suspicious URLs. Installation pip

Elijah 4 Mar 25, 2022
URL Shortener in Flask - Web service using Flask framework for Shortener URLs

URL Shortener in Flask Web service using Flask framework for Shortener URLs Install Create Virtual env $ python3 -m venv env Install requirements.txt

Rafnix Guzman 1 Sep 21, 2021
Python implementation for generating Tiny URL- and bit.ly-like URLs.

Short URL Generator Python implementation for generating Tiny URL- and bit.ly-like URLs. A bit-shuffling approach is used to avoid generating consecut

Alireza Savand 170 Dec 28, 2022
A python code for url redirect check

A python code for url redirect check

Fayas Noushad 1 Oct 24, 2021
A url shortner written in Flask.

url-shortener-elitmus This is a simple flask app which takes an URL and shortens it. This shortened verion of the URL redirects to the user to the lon

2 Nov 23, 2021
declutters url lists for crawling/pentesting

uro Using a URL list for security testing can be painful as there are a lot of URLs that have uninteresting/duplicate content; uro aims to solve that.

Somdev Sangwan 677 Jan 07, 2023
Extract countries, regions and cities from a URL or text

This project is no longer being maintained and has been archived. Please check the Forks list for newer versions. Forks We are aware of two 3rd party

Ushahidi 216 Nov 18, 2022
A simple URL shortener built with Flask

A simple URL shortener built with Flask and MongoDB.

Mike Lowe 2 Feb 05, 2022
A tool programmed to shorten links/mask links

A tool programmed to shorten links/mask links

Anontemitayo 6 Dec 02, 2022
Ukiyo - A simple, minimalist and efficient discord vanity URL sniper

Ukiyo - a simple, minimalist and efficient discord vanity URL sniper. Ukiyo is easy to use, has a very visually pleasing interface, and has great spee

13 Apr 14, 2022
python3 flask based python-url-shortener microservice.

python-url-shortener This repository is for managing all public/private entity specific api endpoints for an organisation. In this case we have entity

Asutosh Parida 1 Oct 18, 2021
a little project to make custom discord invites over a url

custom-dc-invite a little project to make custom discord invites over a url how it works you create a account for

baum1810 2 Oct 03, 2022
:electric_plug: Generating short urls with python has never been easier

pyshorteners A simple URL shortening API wrapper Python library. Installing pip install pyshorteners Documentation https://pyshorteners.readthedocs.i

Ellison 350 Dec 24, 2022
Yet another URL library

Yet another URL library

aio-libs 884 Jan 03, 2023
Temporary-shortner - A webapp that shortner URLs but for limited time

temporary-shortner A webapp that shortens URLs but for a limited time Demo site

Vitor 2 Jan 07, 2022
C++ library for urlencode.

liburlencode C library for urlencode.

Khaidi Chu 6 Oct 31, 2022
Simple Version of ouo.io. shorten any link on the web easily

OUO.IO LINK SHORTENER This is a simple python script that made to short links. currently ouo.io doesn't have Application Programming Interface so i de

Danushka-Madushan 1 Dec 11, 2021
A simple URL shortener app using Python AWS Chalice, AWS Lambda and AWS Dynamodb.

url-shortener-chalice A simple URL shortener app using AWS Chalice. Please make sure you configure your AWS credentials using AWS CLI before starting

Ranadeep Ghosh 2 Dec 09, 2022
A friendly library for parsing HTTP request arguments, with built-in support for popular web frameworks, including Flask, Django, Bottle, Tornado, Pyramid, webapp2, Falcon, and aiohttp.

webargs Homepage: https://webargs.readthedocs.io/ webargs is a Python library for parsing and validating HTTP request objects, with built-in support f

marshmallow-code 1.3k Jan 01, 2023