Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flask.md guide added #286

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
35 changes: 35 additions & 0 deletions guides/python/flask.md
Original file line number Diff line number Diff line change
@@ -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/)