A simple URL shortener built with Flask

Overview

URL Shortener

Latest Release Build Status Coverage Status License

A simple URL shortener built with Flask and MongoDB. A deployed version can be viewed here.

Screenshot

Screenshot

Getting Started

With Docker

Prerequisites

Running

From your terminal/command prompt run:

docker-compose up

Then point your browser to http://127.0.0.1:5000/.

Without Docker

Installing Requirements

  1. (Optional) Install virtualenv and virtualenvwrapper and create a new environment.
  2. Run pip install -r requirements.txt.

Setting up MongoDB

You can either:

  • Install MongoDB locally by going here.

or:

Configuration

The following properties can be configured:

Name Purpose Default
DEBUG If debug mode is enabled. False
ENV Environment the app is running in. production
MONGODB_HOST The MongoDB host name. 127.0.0.1
SECRET_KEY A secret key used for security. default secret key
SERVER_NAME The host and port of the server. 127.0.0.1:5000
SESSION_COOKIE_DOMAIN The domain match rule that the session cookie will be valid for. 127.0.0.1:5000
SSL If the domain has a valid SSL certificate. True

To change these properties you can export them as environment variables or create a file instance/config.py (note that any environment variables take precedence).

URI style connections are also supported for connecting to MongoDB, just supply the URI as MONGODB_HOST (note that URI properties will take precedence).

Running

From your terminal/command prompt run:

./run.py

Then point your browser to http://127.0.0.1:5000/.

Technology Used

For those of you that are interested, the technology used in this project includes:

License

This project is licensed under the MIT License - see the LICENSE file for details.

You might also like...
🌐 URL parsing and manipulation made easy.

furl is a small Python library that makes parsing and manipulating URLs easy. Python's standard urllib and urlparse modules provide a number of URL re

Have you ever wondered: Where does this link go? The REDLI Tool follows the path of the URL.
Have you ever wondered: Where does this link go? The REDLI Tool follows the path of the URL.

Have you ever wondered: Where does this link go? The REDLI Tool follows the path of the URL. It allows you to see the complete path a redirected URL goes through. It will show you the full redirection path of URLs, shortened links, or tiny URLs.

A URL builder for genius :D

genius-url A URL builder for genius :D Usage from gurl import genius_url

declutters url lists for crawling/pentesting
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.

find all the URL of a site with a specific Regex
find all the URL of a site with a specific Regex

href this program will find all the link with a spesfic Regex pattern from a site. what it will do in any site there are a lots of url that may you ne

This is a no-bullshit file hosting and URL shortening service that also runs 0x0.st. Use with uWSGI.

This is a no-bullshit file hosting and URL shortening service that also runs 0x0.st. Use with uWSGI.

A python code for url redirect check

A python code for url redirect check

A url redirect status check module for python

A url redirect status check module for python

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

Releases(v1.6.2)
  • v1.6.2(Aug 25, 2019)

  • v1.6.1(Apr 24, 2019)

  • v1.6.0(Apr 23, 2019)

  • v1.5.1(Apr 21, 2019)

    Bug Fix

    If a user created a new link, clicked copy and immediately changed the link text, then a weird behaviour involving clipboard timeouts would occur. To fix this, we now clear the clipboard timeouts when input changes.

    Source code(tar.gz)
    Source code(zip)
  • v1.5.0(Apr 21, 2019)

  • v1.4.0(Apr 21, 2019)

    New Features

    • Added 500 error page.
    • Added GitHub banner.
    • Added page footer.
    • Allow user to copy links to clipboard.
    • Reject already shortened links.

    screenshot-2

    Source code(tar.gz)
    Source code(zip)
  • v1.3.0(Apr 20, 2019)

  • v1.2.1(Apr 6, 2019)

    Bug Fix

    If /new/ was part of the URL to be shortened, then everything after and including the /new/ segment in the URL would be ignored. For example, http://google.co.uk/new/path-to-something-else/ was being stored as http://google.co.uk in the database. This has now been fixed so the full URL is stored in the database.

    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Mar 18, 2019)

  • v1.1.1(Nov 23, 2018)

    Bug Fix

    Query parameters in URLs were being ignored. For example, https://www.youtube.com/watch?v=FyYMzEplnfU was being stored as https://www.youtube.com/watch in the database. This has now been fixed so the full URL is stored in the database.

    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Nov 22, 2018)

    New Features

    • Sequences are now hex encoded which will mean shorter links as more are added.
    • Requests are not sent for links that are already in the cache.
    • Links that are already in the cache and requested to be shortened again are now moved to the top of the Your Links list.
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Nov 21, 2018)

Owner
Mike Lowe
like a sucked and spat-out smartie
Mike Lowe
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
A simple, immutable URL class with a clean API for interrogation and manipulation.

purl - A simple Python URL class A simple, immutable URL class with a clean API for interrogation and manipulation. Supports Pythons 2.7, 3.3, 3.4, 3.

David Winterbottom 286 Jan 02, 2023
A simple URL shortener built with Flask

A simple URL shortener built with Flask and MongoDB.

Mike Lowe 2 Feb 05, 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
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
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
hugeURLer 是一个基于 Python 和 GitHub action 的短链接服务

hugeURLer 是一个基于 Python 和 GitHub action 的短链接服务 如何使用 您需要把库 clone 到本地,然后在终端执行 python3 .\src\addNewRedirection.py url ,就能创建一个指向你设置的 url 的跳转页面。

安东尼洪 2 Dec 22, 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
Customizable URL shortener written in Python3 for sniffing and spoofing

Customizable URL shortener written in Python3 for sniffing and spoofing

3 Nov 22, 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
Astra is a tool to find URLs and secrets.

Astra finds urls, endpoints, aws buckets, api keys, tokens, etc from a given url/s. It combines the paths and endpoints with the given domain and give

Stinger 198 Dec 27, 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
UDdup - URLs Deduplication Tool

UDdup - URLs Deduplication Tool The tool gets a list of URLs, and removes "duplicate" pages in the sense of URL patterns that are probably repetitive

Rotem Reiss 128 Dec 21, 2022
A URL builder for genius :D

genius-url A URL builder for genius :D Usage from gurl import genius_url

ꌗᖘ꒒ꀤ꓄꒒ꀤꈤꍟ 12 Aug 14, 2021
Have you ever wondered: Where does this link go? The REDLI Tool follows the path of the URL.

Have you ever wondered: Where does this link go? The REDLI Tool follows the path of the URL. It allows you to see the complete path a redirected URL goes through. It will show you the full redirectio

JAYAKUMAR 28 Sep 11, 2022
Shorten-Link - Make shorten URL with Cuttly API

Shorten-Link This Script make shorten URL with custom slashtag The script take f

Ahmed Hossam 3 Feb 13, 2022
C++ library for urlencode.

liburlencode C library for urlencode.

Khaidi Chu 6 Oct 31, 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
🌐 URL parsing and manipulation made easy.

furl is a small Python library that makes parsing and manipulating URLs easy. Python's standard urllib and urlparse modules provide a number of URL re

Ansgar Grunseid 2.4k Jan 04, 2023
A teeny Tiny module to check URLs against discord's list of phishing domains

A teeny Tiny module to check URLs against discord's list of phishing domains

kaj 1 Aug 29, 2022