Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons

© 2026 BraveProgrammer. All rights reserved.

  1. Courses
  2. /
  3. Python Fundamentals

Lesson 46 of 55 · Python

Introduction to Flask Web Framework

Duration: 20 minutes

Introduction to Flask Web Framework\n\nFlask is a lightweight, extensible web framework that lets you spin up a web server with just a few lines of code.\n\n```python\nfrom flask import Flask\n\napp = Flask(name)\n\n@app.route('/')\ndef index():\n return 'Hello from Flask!'

\nif name == 'main':\n app.run(debug=True)\n```\n\nRun the script and open http://127.0.0.1:5000/ in your browser. The debug=True flag enables hot‑reloading and an interactive debugger.\n

Previous: Building a CLI with argparseNext: Building a Simple REST API