🏫 Programming & Software Development

Python Programming From Basics to FastAPI

Complete Python Course - From Beginner to Building REST APIs with FastAPI

Duration

12 Weeks

Weekly Hours

4 Hours

M

Course Incharge

Muzammil Bilwani

Python Programming From Basics to FastAPI

📋 Prerequisites

No prior programming experience required. Familiarity with basic computing recommended.

📖 Course Description

Learn to code with Python from scratch and build powerful, real-world applications using FastAPI. This course bridges beginner fundamentals and advanced backend development practices with industry-standard API development, database integration, and deployment strategies.

What You Will Learn

Write clean and efficient Python code following best practices

Master functions, loops, data structures, and Object-Oriented Programming

Work with files, exceptions, and external libraries

Build production-ready REST APIs using FastAPI

Implement authentication, validation, and database integration

Deploy APIs to cloud platforms

Use Git and GitHub for version control and collaboration

Course Outline

1

Introduction to Python and Programming

  • What is Python? Use cases and ecosystem
  • Why Python for backend development and APIs?
  • Installing Python and setting up VS Code
  • Python virtual environments and best practices
  • Writing your first Python script
  • Running scripts from terminal/command prompt
  • Hands-on: Build a basic calculator using input/output
2

Data Types, Variables, and Operators

  • Variables and basic data types (int, float, str, bool)
  • Arithmetic, comparison, and logical operators
  • Type conversion and type hints
  • String formatting (f-strings, format method)
  • Input validation basics
  • Hands-on: Create a unit converter with input validation (e.g., temperature, currency)
3

Control Flow - Conditions and Loops

  • If/else statements and nested conditions
  • Ternary operators in Python
  • for and while loops
  • break, continue, and loop logic
  • List comprehensions basics
  • Hands-on: Build a number guessing game with input validation or menu-driven app
4

Functions and Modules

  • Defining and calling functions
  • Function arguments: positional, keyword, default, *args, **kwargs
  • Return values and function documentation
  • Python modules and importing
  • Creating and using custom modules
  • Hands-on: Create a utility module (e.g., tax calculator, grade calculator with multiple functions)
5

Data Structures - Lists, Tuples, Sets, Dictionaries

  • Creating and manipulating collections
  • List methods and operations
  • Dictionaries: keys, values, and nested structures
  • Sets for unique collections
  • Use cases for each data type
  • Comprehensions for lists and dictionaries
  • Hands-on: Store and retrieve student records from a dictionary with CRUD operations
6

File Handling and Exceptions

  • Reading from and writing to text files
  • Working with CSV and JSON files
  • Context managers (with statement)
  • Try/except blocks and common exceptions
  • Custom exception handling
  • Logging basics for debugging
  • Hands-on: Create a CLI task tracker that saves tasks to JSON file
7

Object-Oriented Programming (OOP)

  • Classes and objects in Python
  • Constructor method (__init__)
  • Instance vs class attributes
  • Methods and self parameter
  • Inheritance and polymorphism
  • Encapsulation and property decorators
  • Hands-on: Build a class-based system (library management or bank account with OOP principles)
8

Using Python Libraries & External APIs

  • Installing libraries using pip and requirements.txt
  • Making HTTP requests using requests library
  • Parsing JSON data and handling API responses
  • Error handling for API calls
  • Working with API authentication (API keys)
  • Environment variables for sensitive data
  • Hands-on: Build a weather app or currency converter using a public API with error handling
9

Git and GitHub - Version Control Essentials

  • What is Git? What is GitHub?
  • Initializing a repo, making commits
  • Branching and merging basics
  • Writing meaningful commit messages
  • Pushing code to GitHub
  • Creating .gitignore files
  • README.md documentation best practices
  • Hands-on: Upload a Python project to GitHub with proper README and documentation
10

Virtual Environments and Project Management

  • Why use virtual environments?
  • Creating and activating environments with venv
  • Managing dependencies with requirements.txt
  • Project structure best practices
  • Introduction to environment variables
  • Configuration management
  • Hands-on: Set up an isolated Python project ready for FastAPI with proper structure
11

Introduction to FastAPI - Building REST APIs

  • What is FastAPI and why use it?
  • RESTful API principles (GET, POST, PUT, DELETE)
  • Installing FastAPI and Uvicorn
  • Creating your first API endpoint
  • Path parameters and query parameters
  • Request and response models with Pydantic
  • Automatic API documentation (Swagger UI)
  • Data validation and error handling
  • Hands-on: Build a simple CRUD API for a to-do list with validation
12

Advanced FastAPI & Capstone Project

  • Database integration with SQLAlchemy (SQLite or PostgreSQL)
  • Defining database models and relationships
  • Implementing authentication with JWT tokens
  • Password hashing with bcrypt
  • Environment variables and configuration
  • API testing basics
  • Deployment options: Heroku, Railway, or AWS
  • Capstone Project: Build and deploy a complete API:
  • - User authentication system
  • - Database integration with CRUD operations
  • - Input validation and error handling
  • - API documentation
  • - Deployment to cloud platform
  • Project presentation with GitHub repository
  • Best practices for API development
  • Next steps: Advanced topics (async programming, WebSockets, microservices)

📊 Grading Criteria

ComponentPercentage
Quizzes20%
Class Participation / Attendance15%
Projects25%
Final Projects40%
Total100%

Ready to Register in This Course?

Join thousands of students who have transformed their careers. Start your journey today!