diff --git a/README.md b/README.md index aa56dde9..97cd7998 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,7 @@ You may want to take a look at other articles too: - [Prototypal Inheritance](https://github.com/the-ethan-hunt/first-timers-guide/blob/master/guides/Programming_Paradigm/OOP/Prototypal_Inheritance.md) - Python - [Django](https://github.com/the-ethan-hunt/first-timers-guide/blob/master/guides/python/django.md) + - [Flask](https://github.com/the-ethan-hunt/first-timers-guide/blob/master/guides/python/flask.md) - Security - [Honeypot](https://github.com/the-ethan-hunt/first-timers-guide/blob/master/guides/Security/honeypot.md) - [RSA](https://github.com/the-ethan-hunt/first-timers-guide/blob/master/guides/Security/RSA.md) diff --git a/guides/python/flask.md b/guides/python/flask.md new file mode 100644 index 00000000..2f2dde38 --- /dev/null +++ b/guides/python/flask.md @@ -0,0 +1,35 @@ +# 1: What is Flask? Why Should You Care? + +Flask is a web application framework written in Python, meaning it is a third-party Python library used for developing web applications. + +It makes the process of designing a web application simpler. Flask lets us focus on what the users are requesting and what sort of response to give back. + + +You probably heard Django while looking for Flask.Both are web frameworks written in Python. +Django is a full-stack web framework for Python, whereas Flask is a lightweight and extensible Python web framework + +# 2: Why Flask? + Flask is simple and easy to get started with while Django is heavy for building web applications + +# 3: Flask Structure +Instead of cramming all your code into one place, Flask helps you organize: +- **(1) logic** +- **(2) design** +- **(3) database into separate files.** + +**LOGIC**: ‘main.py’ imports the Flask module, creates a web server, creates an instance of the Flask class — in which you write all your “logical” code structuring your web app. + +**DESIGN**: The Flask Framework looks for HTML files in a folder called templates for designs. + +**DATABASE**: Flask does not support databases natively, but there are a number of Flask extensions such as Flask-SQLAlchemy,etc. + + +## RESOURCES TO LEARN Flask: + +[Learn Flask for Python — Full Tutorial](https://www.youtube.com/watch?v=Z1RJmh_OqeA) + +[How to build a web application using Flask](https://www.freecodecamp.org/news/how-to-build-a-web-application-using-flask-and-deploy-it-to-the-cloud-3551c985e492/) + +[Build Your 1st Python Web App With Flask](https://medium.com/bhavaniravi/build-your-1st-python-web-app-with-flask-b039d11f101c) + +[Flask Tutorials](https://realpython.com/tutorials/flask/)