Build a Python Flask URL Shortener

# Introduction In this project, we will learn how to create a URL shortener using Python and Flask. A URL shortener is a tool that takes a long URL and converts it into a shorter, more manageable URL. This can be useful for sharing links on social media or in emails, as well as making long URLs more user-friendly. ## 👀 Preview ![Alt text](https://file.labex.io/namespace/718bace8-27a3-4200-a588-dde4041ceeb9/flask/project-creating-a-url-shortener-with-python-and-flask/challenge-1/assets/20230925-15-14-55-TFYGfKVP.png) ## 🎯 Tasks In this project, you will learn to: - Set up a project folder and create the necessary files for the URL shortener. - Set up a SQLite database to store the original URLs and their corresponding shortened URLs. - Generate short URLs using random characters. - Create an index page where users can submit a URL to be shortened and display the shortened URL. - Redirect users to the original URL when they enter a shortened URL. - Create a history page to display all the URLs that have been shortened. - Run the project and test it in a web browser. ## 🏆 Achievements In this project, you will learn: - How to set up a Flask project and create the necessary files. - How to use SQLite to create a database and execute queries. - How to generate random characters for the short URLs. - How to create HTML templates and extend base templates. - How to handle form submissions and display dynamic content using Flask. - How to redirect users to different URLs based on their input.

|60 : 00

Click the virtual machine below to start practicing