https://github.com/zootedb0t/url_shortner
A simple url-shortner built using flask and bitly api.
https://github.com/zootedb0t/url_shortner
bitly-api css docker docker-image dockerfile flask html url-shortener webapp
Last synced: 4 months ago
JSON representation
A simple url-shortner built using flask and bitly api.
- Host: GitHub
- URL: https://github.com/zootedb0t/url_shortner
- Owner: zootedb0t
- License: gpl-2.0
- Created: 2021-04-26T15:30:17.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-03-10T12:20:51.000Z (over 1 year ago)
- Last Synced: 2025-10-05T06:57:19.999Z (9 months ago)
- Topics: bitly-api, css, docker, docker-image, dockerfile, flask, html, url-shortener, webapp
- Language: Python
- Homepage:
- Size: 3.89 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# URL Shortener App  [](https://github.com/zootedb0t/url_shortner/actions/workflows/codeql.yml) [](https://github.com/zootedb0t/url_shortner/actions/workflows/pylint.yml)
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](https://bitly.com/) 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](https://dev.bitly.com/api-reference/#getGroups)
## 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

### Add Api Keys

### User database containing urls

### Short-URL generated through api

### Short-URL QR Code
