Skip to content

nthndkid/python-flask-basics

Repository files navigation

🐍 Python Flask Assignment 🚀

📌 What You'll Learn

In this repository, you will learn:

  • How to create and activate a virtual environment
  • How to extract dependencies in a virtual environment
  • How to create a simple Flask app
  • How to send and receive data between a client and a Flask server
  • How to process data and return a response
  • How to use Jinja templating for dynamic web pages

📥 Getting Started with the Template Repository

Follow these steps to create your own repository from this template and set it up locally.

1️⃣ Use This Template

  • Click on the "Use this template" button at the top of this repository on GitHub.
  • Choose Create a new repository.
  • Name it something like python-flask-basics.
  • Set the repository visibility to public.
  • Click Create repository from template.

2️⃣ Clone Your New Repository

Once your repository has been created from the template, clone it to your local machine:

git clone https://github.com/YOUR_GITHUB_USERNAME/python-flask-basics.git

Replace YOUR_GITHUB_USERNAME with your actual GitHub username.

3️⃣ Navigate to the Project Directory

Move into the project folder:

cd python-flask-basics

🔧 Setting Up the Project

4️⃣ Create and Activate a Virtual Environment

For Windows:

python -m venv venv
venv\Scripts\activate

For macOS/Linux:

python3 -m venv venv
source venv/bin/activate

5️⃣ Install Dependencies

Once inside the virtual environment, install the required dependencies:

pip install -r requirements.txt

🚀 Running the Flask Server

6️⃣ Start the Flask Server

Run the following command to start the Flask server:

python app.py

By default, Flask will run on http://127.0.0.1:5000/. Open this URL in your browser to check if the app is working.


📝 Assignments

No. Topic Description
1 Using Virtual Environment Learn how to create and activate a virtual environment.
2 Pip Freeze Extract dependencies using pip freeze and save them to requirements.txt.
3 Flask Basics - GET Request Build a simple Flask app that handles a GET request and returns a basic response.
4 Flask Basics - POST Request Create a Flask API that processes POST requests and returns a JSON response.

📤 Submission

  • Follow the instructions in each assignment folder and complete the exercises.
  • Push your completed work to your GitHub repository and submit the link via Google Classroom.

👥 Contributors


🎉 Happy Coding!

Enjoy learning Flask and building awesome projects! 🚀🐍

                       .,,uod8B8bou,,.
              ..,uod8BBBBBBBBBBBBBBBBRPFT?l!i:.
         ,=m8BBBBBBBBBBBBBBBRPFT?!||||||||||||||
         !...:!TVBBBRPFT||||||||||!!^^""'   ||||
         !.......:!?|||||!!^^""'            ||||
         !.........||||                     ||||
         !.........||||  ##                 ||||             GDG - PUP
         !.........||||                     ||||
         !.........||||                     ||||
         !.........||||                     ||||
         !.........||||                     ||||
         `.........||||                    ,||||
          .;.......||||               _.-!!|||||
   .,uodWBBBBb.....||||       _.-!!|||||||||!:'
!YBBBBBBBBBBBBBBb..!|||:..-!!|||||||!iof68BBBBBb....
!..YBBBBBBBBBBBBBBb!!||||||||!iof68BBBBBBRPFT?!::   `.
!....YBBBBBBBBBBBBBBbaaitf68BBBBBBRPFT?!:::::::::     `.
!......YBBBBBBBBBBBBBBBBBBBRPFT?!::::::;:!^"`;:::       `.
!........YBBBBBBBBBBRPFT?!::::::::::^''...::::::;         iBBbo.
`..........YBRPFT?!::::::::::::::::::::::::;iof68bo.      WBBBBbo.
  `..........:::::::::::::::::::::::;iof688888888888b.     `YBBBP^'
    `........::::::::::::::::;iof688888888888888888888b.     `
      `......:::::::::;iof688888888888888888888888888888b.
        `....:::;iof688888888888888888888888888888888899fT!
          `..::!8888888888888888888888888888888899fT|!^"'
            `' !!988888888888888888888888899fT|!^"'
                `!!8888888888888888899fT|!^"'
                  `!988888888899fT|!^"'
                    `!9899fT|!^"'
                      `!^"'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published