Giter Site home page Giter Site logo

zootedb0t / url_shortner Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 3.96 MB

A simple url-shortner built using flask and bitly api.

License: GNU General Public License v2.0

HTML 34.61% CSS 17.29% JavaScript 1.86% Python 45.11% Dockerfile 1.12%
css flask html webapp docker bitly-api url-shortener docker-image dockerfile

url_shortner's Introduction

URL Shortener App GitHub CodeQL Pylint

A url-shortner built using flask and Bitly api. It has following dependencies:

  • Flask - Core dependency
  • SQLAlchemy - For working with database
  • requests - For sending GET and POST request
  • PyQRCode - For generating QR code of URL

For using bitly api go to Bitly website and get a free account to get authentication key and group id. Use these credentials in the applications.

To find out guid for your account. Make a GET request to https://api-ssl.bitly.com/v4/groups you can use Postman, Curl, Node or Python request module.

While making request pass your Authorization token to header. In curl you can do this

curl \
-H 'Authorization: Bearer {TOKEN}' \
-X GET \
https://api-ssl.bitly.com/v4/groups

This returns a json object containing guid. For more info

Running App Locally

  • Clone the repo:
git clone https://github.com/zootedb0t/url_shortner && cd url_shortner
  • Create a python virtual environment:
python -m venv venv
  • Activate virtual environment:
source venv/bin/activate
  • Install required modules:
pip install -r requirements.txt
  • Run app:
flask run

App in action

App home page

Screenshot_2023-02-09-09-15-41_1920x1080

Add Api Keys

Screenshot_2023-02-09-09-18-09_1920x1080

User database containing urls

Screenshot_2023-03-24-01-54-00_1920x1080

Short-URL generated through api

Screenshot_2023-03-17-11-46-59_1920x1080

Short-URL QR Code

Screenshot_2023-03-17-11-43-27_1920x1080

url_shortner's People

Contributors

dependabot[bot] avatar zootedb0t avatar

url_shortner's Issues

TODO

  • Add option to delete api keys from database
  • Add check for empty api key
  • Center api table

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.