# 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/lab-1/assets/20230925-15-14-55-TFYGfKVP.png) ## ðŊ Tasks In this project, you will learn: - How to set up a project folder and create the necessary files for the URL shortener. - How to set up a SQLite database to store the original URLs and their corresponding shortened URLs. - How to generate short URLs using random characters. - How to create an index page where users can submit a URL to be shortened and display the shortened URL. - How to redirect users to the original URL when they enter a shortened URL. - How to create a history page to display all the URLs that have been shortened. - How to run the project and test it in a web browser. ## ð Achievements After completing this project, you will be able to: - Understand how to set up a Flask project and create the necessary files. - Utilize SQLite to create a database and execute queries. - Generate random characters for the short URLs. - Develop HTML templates and extend base templates. - Handle form submissions and display dynamic content using Flask. - Implement URL redirection based on user input.
Click the virtual machine below to start practicing