Skip to content

A simple project purely aimed for testing/interacting with Python's Flask framework.

License

Notifications You must be signed in to change notification settings

MJTech46/FLASK-URL-shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask URL Shortener

A simple project purely aimed for testing/interacting with Python's Flask framework.

Table of Contents

Overview

This is a URL Shortener application built using the Flask framework in Python. It allows users to input a long URL and get a shortened version of it, which can then be shared or used elsewhere. The shortened URLs redirect to the original URLs when accessed.

Features

  • URL Shortening: Converts long URLs into short, manageable links.
  • Redirect Functionality: Shortened URLs redirect users to the original long URLs.
  • Custom Short URLs: Option to create custom short links ( Reroll ).
  • Analytics Dashboard: Track clicks and provide analytics for shortened URLs.
  • Persistent Storage: Stores the original and shortened URLs in a database for easy retrieval.
  • Error Handling: Includes basic error handling for invalid URLs and duplicate entries.

Tech Stack

  • Python: Core programming language used for developing the backend.
  • Flask: Lightweight web framework used for building the application.
  • HTML/CSS: Frontend structure and styling.
  • SQLite: Database for storing URL mappings.
  • Jinja2: Template engine used in Flask for rendering dynamic content.
  • Bootstrap: Used for responsive design and UI components.

Screenshots

Home Page

Home Page

URL Shortening Process

URL Shortening Process

Short URL Created

Short URL Created

Redirection Preview

Redirection in Action

Installation and Setup

  1. Clone the repository:

    git clone https://github.com/yourusername/your-repository.git
    cd your-repository
  2. Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install the required packages:

    pip install -r requirements.txt
  4. Run the application:

    python3 app.py  # On Windows use `python app.py`
  5. Access the application: Open a web browser and go to http://localhost/.

Contributing

Contributions are welcome! Please fork this repository and submit a pull request for any feature enhancements or bug fixes.

License

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

Acknowledgments

Special thanks to the Flask community and all the developers who contribute to open-source software.

About

A simple project purely aimed for testing/interacting with Python's Flask framework.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published