# Python for AI & FastAPI ## Docs - [Advanced OOP in Python: Metaclasses, Dunders & Frameworks](https://fastapi2day.codewithsiva.dev/advanced-python/advanced-oop.md): Master Python's advanced OOP mechanics — abstract classes, metaclasses, dunder methods, dynamic class creation, and framework patterns. - [Async Programming in Python: async, await & asyncio](https://fastapi2day.codewithsiva.dev/advanced-python/async-programming.md): Learn async/await syntax, the event loop, concurrent tasks with asyncio.gather, and why FastAPI uses async for high-performance I/O. - [Python Comprehensions, Iterators & Generators Guide](https://fastapi2day.codewithsiva.dev/advanced-python/comprehensions.md): Write expressive Pythonic code using list, dict, and set comprehensions alongside custom iterators, memory-efficient generators, and context managers. - [Context Managers: Setup, Cleanup & the with Statement](https://fastapi2day.codewithsiva.dev/advanced-python/context-mgmt.md): Learn how Python context managers work, how to build them with classes or generators, and how FastAPI uses the same yield-based mechanism. - [Python Dataclasses: Clean Data Models Without Boilerplate](https://fastapi2day.codewithsiva.dev/advanced-python/data-class.md): Learn Python dataclasses — auto-generated constructors, field defaults, frozen instances, ordering, utility functions, and when to use them vs Pydantic. - [Dependency Injection in Python: Decoupling Your Code](https://fastapi2day.codewithsiva.dev/advanced-python/di.md): Learn the Dependency Injection pattern, understand why loose coupling matters for testability, and see how FastAPI automates DI with Depends(). - [Python .env Files: Managing Secrets and Config Safely](https://fastapi2day.codewithsiva.dev/advanced-python/dotenv.md): Protect API keys and credentials by storing them in .env files and loading them with python-dotenv — the industry standard approach. - [Functional Programming in Python: map, filter & reduce](https://fastapi2day.codewithsiva.dev/advanced-python/functional-programming.md): Apply functional programming concepts in Python — declarative style, higher-order functions, and the map, filter, and reduce pipeline. - [Advanced Functions: Lambdas, Closures & Decorators](https://fastapi2day.codewithsiva.dev/advanced-python/functions.md): Master Python's advanced function features — first-class objects, lambdas, *args/**kwargs, closures, and custom decorator patterns. - [Python Internals: Memory Model, Objects & References](https://fastapi2day.codewithsiva.dev/advanced-python/internals.md): Understand Python's memory model — mutable vs immutable types, object identity, integer caching, reference counting, and garbage collection. - [Python Type Hints: Annotate Variables and Functions](https://fastapi2day.codewithsiva.dev/advanced-python/type-hints.md): Learn how to use Python type hints for variables, functions, and collections, and how Pydantic and FastAPI use them for runtime validation. - [Working with Data Files: Text, JSON & CSV in Python](https://fastapi2day.codewithsiva.dev/advanced-python/working-with-data.md): Read, write, and process plain text files, JSON API payloads, and CSV spreadsheets using only Python's built-in standard library tools. - [Python Data Structures: Lists, Tuples, Dicts & Sets](https://fastapi2day.codewithsiva.dev/basic-python/data-structures.md): Explore Python's built-in data structures — strings, lists, tuples, sets, dictionaries, and deques — and learn when to use each. - [Python Exception Handling: try, except & Custom Errors](https://fastapi2day.codewithsiva.dev/basic-python/exception-handling.md): Handle runtime errors gracefully with try-except, raise custom exceptions, and use else and finally for clean resource management. - [Python Functions: Parameters, Scope, Closures & Decorators](https://fastapi2day.codewithsiva.dev/basic-python/functions.md): Define reusable functions, master every argument type, understand LEGB scope rules, and write closures, decorators, and generators. - [Python Modules, Packages & the Standard Library Guide](https://fastapi2day.codewithsiva.dev/basic-python/modules-packages.md): Create modules and packages, use essential Standard Library tools like pathlib and json, and install third-party packages with pip. - [Python OOP & Classes: Blueprints, Inheritance & More](https://fastapi2day.codewithsiva.dev/basic-python/oop-classes.md): Define classes and instances, apply inheritance and encapsulation, use properties, abstract base classes, and introspection tools. - [Packing & Unpacking in Python: Starred Expressions](https://fastapi2day.codewithsiva.dev/basic-python/packing-unpacking.md): Master Python packing and unpacking — tuple packing, starred expressions, dictionary merging, and clean loop iteration patterns. - [Python Basics: Syntax, Variables, Types & Control Flow](https://fastapi2day.codewithsiva.dev/basic-python/python-basics.md): Master Python's core syntax, variable model, data types, operators, and control-flow constructs to confidently write your first programs. - [Matplotlib: Building Charts and Visualizations in Python](https://fastapi2day.codewithsiva.dev/data-analysis/matplotlib.md): Create line plots, histograms, scatter plots, bar charts, box plots, and multi-panel subplot grids with Matplotlib's pyplot interface. - [NumPy: Numerical Computing Foundations for Data Science](https://fastapi2day.codewithsiva.dev/data-analysis/numpy.md): Master NumPy arrays, vectorization, broadcasting, indexing, reshaping, aggregation, and mathematical operations for data science and ML. - [Pandas: Python Library for Data Manipulation and Analysis](https://fastapi2day.codewithsiva.dev/data-analysis/pandas.md): Learn Pandas DataFrames and Series for loading, exploring, filtering, transforming, merging, and cleaning real-world datasets in Python. - [Seaborn: Statistical Data Visualization for Python](https://fastapi2day.codewithsiva.dev/data-analysis/seaborn.md): Use Seaborn to create histograms, KDE plots, pair plots, bar plots, violin plots, regression lines, and correlation heatmaps with ease. - [Data Visualization Guide: Uni, Bi & Multivariate Analysis](https://fastapi2day.codewithsiva.dev/data-analysis/visualization-guide.md): A practical guide to univariate, bivariate, and multivariate analysis using Matplotlib and Seaborn on a student performance dataset. - [API Documentation: Swagger UI and ReDoc in FastAPI](https://fastapi2day.codewithsiva.dev/fastapi-foundations/api-documentation.md): Customise FastAPI's auto-generated OpenAPI documentation with app metadata, route summaries, field descriptions, and interactive Swagger UI testing. - [Modular Routing with FastAPI APIRouter and Prefixes](https://fastapi2day.codewithsiva.dev/fastapi-foundations/apirouter.md): Split FastAPI routes into dedicated router files using APIRouter, add prefixes and tags, and register them in main.py for a scalable project layout. - [FastAPI Data Validation and Pydantic Models in Python](https://fastapi2day.codewithsiva.dev/fastapi-foundations/data-validation-models.md): Learn how to separate request, internal, and response models in FastAPI to validate all incoming data and safely filter what clients receive. - [FastAPI Dependency Injection with Depends() Explained](https://fastapi2day.codewithsiva.dev/fastapi-foundations/dependency-injection.md): Understand Dependency Injection and Inversion of Control, then learn how FastAPI's Depends() injects database sessions, services, and current users. - [FastAPI Exception Handling: HTTP & Validation Errors](https://fastapi2day.codewithsiva.dev/fastapi-foundations/exception-handling.md): Handle HTTP exceptions, Pydantic validation errors, and unexpected runtime errors in FastAPI using application-level exception handlers. - [FastAPI Fundamentals: Routing, Params & Validation](https://fastapi2day.codewithsiva.dev/fastapi-foundations/fundamentals.md): Master FastAPI routing, path and query parameters, request bodies, response models, and data validation using Pydantic Field, Query, and Path. - [How the Web Works: HTTP Requests, Responses & Status Codes](https://fastapi2day.codewithsiva.dev/fastapi-foundations/how-web-works.md): Learn the client-server model, HTTP request anatomy, response status codes, and REST methods before writing a single line of FastAPI code. - [FastAPI Foundations: Build Production-Ready Python APIs](https://fastapi2day.codewithsiva.dev/fastapi-foundations/index.md): Explore the FastAPI Foundations module — from HTTP basics to JWT auth, covering everything you need to build production-ready Python APIs. - [Introduction to FastAPI: Install and Run Your First API](https://fastapi2day.codewithsiva.dev/fastapi-foundations/intro-to-fastapi.md): Discover what FastAPI is, why it's one of Python's fastest frameworks, and how to write and run your very first application in minutes. - [JWT Authentication and Role-Based Access in FastAPI](https://fastapi2day.codewithsiva.dev/fastapi-foundations/jwt-auth.md): Implement JWT token-based authentication in FastAPI — register users, hash passwords, issue access tokens, protect routes with Depends, and enforce roles. - [In-Memory CRUD Operations with FastAPI and Pydantic](https://fastapi2day.codewithsiva.dev/fastapi-foundations/local-crud.md): Implement a fully working Employee Management System CRUD API using in-memory Python dictionaries to focus on FastAPI routing and response models. - [Modularising FastAPI: Controller, Service, Repository](https://fastapi2day.codewithsiva.dev/fastapi-foundations/modularisation.md): Refactor a FastAPI app into a layered Controller–Service–Repository architecture with clean dependency injection using Depends() for scalable code. - [Request Handling in FastAPI: Params, Bodies & Headers](https://fastapi2day.codewithsiva.dev/fastapi-foundations/request-handling.md): Master path parameters, query parameters, JSON request bodies, and HTTP headers in FastAPI with full type validation and the Annotated pattern. - [Response Handling in FastAPI: Models, Codes & Errors](https://fastapi2day.codewithsiva.dev/fastapi-foundations/response-handling.md): Control outbound data with FastAPI response models, set HTTP status codes correctly, raise HTTP exceptions, and return custom response types. - [SQL & ORM Integration with FastAPI and SQLModel Guide](https://fastapi2day.codewithsiva.dev/fastapi-foundations/sql-orm.md): Replace in-memory storage with a real SQL database in FastAPI using SQLModel and SQLAlchemy — models, sessions, CRUD operations, and migrations. - [Course Resources: Notebooks, Datasets, and Practice Files](https://fastapi2day.codewithsiva.dev/getting-started/course-resources.md): Access all practice notebooks, exercise files, real-world datasets, and downloadable cheat sheets included with the Python for AI & FastAPI course. - [Writing and Running Your First Python Script in VS Code](https://fastapi2day.codewithsiva.dev/getting-started/first-python-file.md): Create your first .py file in VS Code, write a print statement, select a Python interpreter, and run your program from the terminal. - [Getting Started with Python for AI and FastAPI Course](https://fastapi2day.codewithsiva.dev/getting-started/index.md): Everything you need to get up and running with Python — from understanding the language to installing it on your machine and writing your first code. - [Installing Python on Your Computer: Complete Guide](https://fastapi2day.codewithsiva.dev/getting-started/installing-python.md): A platform-aware guide to installing Python on Windows, macOS, or Linux, with verification steps to confirm your installation is working correctly. - [Installing Python on Linux: apt, dnf, pacman and More](https://fastapi2day.codewithsiva.dev/getting-started/installing-python-linux.md): Step-by-step guide to installing Python on Ubuntu, Debian, Fedora, Arch, and other Linux distributions using your system's native package manager. - [Installing Python on macOS: Official Installer and Homebrew](https://fastapi2day.codewithsiva.dev/getting-started/installing-python-macos.md): Step-by-step guide to installing Python on a Mac using the official installer or Homebrew, with shell configuration tips and troubleshooting advice. - [Installing Python on Windows 10 and 11: Full Guide](https://fastapi2day.codewithsiva.dev/getting-started/installing-python-windows.md): Step-by-step guide to installing Python on Windows, setting up PATH, verifying your installation, and fixing the most common Windows-specific issues. - [Interactive Python REPL and the VS Code Interactive Shell](https://fastapi2day.codewithsiva.dev/getting-started/interactive-python.md): Use the Python REPL and VS Code's interactive window to run code cell by cell from .py files, inspect variables, and iterate quickly on AI projects. - [Jupyter Notebooks in VS Code: Working with .ipynb Files](https://fastapi2day.codewithsiva.dev/getting-started/ipynb-notebooks.md): Explore Jupyter notebooks in VS Code — create .ipynb files, run cells interactively, and choose the right notebook environment for your workflow. - [Installing Python Packages with pip and PyPI Guide](https://fastapi2day.codewithsiva.dev/getting-started/packages-and-pip.md): Learn how to use pip to install, update, and remove Python packages from PyPI, manage requirements.txt, and avoid common installation pitfalls. - [Ruff: Linting and Auto-Formatting Python Code in VS Code](https://fastapi2day.codewithsiva.dev/getting-started/ruff.md): Install the Ruff extension in VS Code to automatically lint and format your Python code on save, following PEP 8 best practices effortlessly. - [Python Virtual Environments: Isolation Per Project](https://fastapi2day.codewithsiva.dev/getting-started/virtual-environments.md): Understand why virtual environments are essential in Python, and learn to create and activate a .venv for every project using VS Code or the terminal. - [VS Code: The Standard IDE for Python and AI Development](https://fastapi2day.codewithsiva.dev/getting-started/vscode-introduction.md): Discover why Visual Studio Code is the go-to editor for Python and AI development, and how it powers today's most popular AI coding tools. - [Installing VS Code and Essential Python Extensions](https://fastapi2day.codewithsiva.dev/getting-started/vscode-setup.md): Step-by-step guide to installing Visual Studio Code and the Python, Pylance, and Jupyter extensions you need for Python AI development. - [VS Code Workspaces: Creating and Opening Python Projects](https://fastapi2day.codewithsiva.dev/getting-started/vscode-workspace.md): Learn how to create a dedicated projects folder, open it in VS Code, and save a workspace file to quickly return to your project each day. - [What Is Python and Why Is It Used for AI Development?](https://fastapi2day.codewithsiva.dev/getting-started/what-is-python.md): Discover what Python is, how dynamic typing and the interpreter work, and why Python has become the dominant language for AI and machine learning. - [Python for AI & FastAPI — Learn to Build Real Applications](https://fastapi2day.codewithsiva.dev/index.md): Learn Python from scratch and build real AI applications with FastAPI. A hands-on beginner course taught by Siva Prasad K. V. at sgrinfo.tech. - [Using AI Assistants to Learn Python More Effectively](https://fastapi2day.codewithsiva.dev/introduction/ai-assistants.md): Learn how to use ChatGPT, GitHub Copilot, Cursor, and Claude as learning tools while building real Python understanding — not just copying answers. - [Is This Python for AI & FastAPI Course Right for You?](https://fastapi2day.codewithsiva.dev/introduction/is-this-for-you.md): Find out if this Python for AI and FastAPI course matches your experience level, learning style, and goals before you get started. - [Welcome to Python for AI & FastAPI — Course Overview](https://fastapi2day.codewithsiva.dev/introduction/welcome.md): Meet your instructor Siva Prasad K. V. and discover what you will learn in this hands-on Python for AI and FastAPI beginner course. - [Why Python Is the Best Language for AI Development](https://fastapi2day.codewithsiva.dev/introduction/why-python.md): Discover why Python dominates AI and machine learning, how it compares to other languages, and why learning it now gives you a real career advantage. - [Practical Python: Building Real, Organized Programs](https://fastapi2day.codewithsiva.dev/practical-python/index.md): Go beyond single scripts and learn how professional Python projects are structured, organized, and run in the real world with reusable, maintainable code. - [Organizing Python Code into Reusable Functions](https://fastapi2day.codewithsiva.dev/practical-python/organizing-code.md): Learn how to split a growing Python script into separate helper files and import functions across modules to keep your code clean. - [Professional Python Project Handling Guidelines](https://fastapi2day.codewithsiva.dev/practical-python/project-handling.md): Learn professional conventions for modules, packages, absolute imports, virtual environments, and modern tooling with uv for every Python project. - [Structuring Your First Multi-File Python Project](https://fastapi2day.codewithsiva.dev/practical-python/project-structure.md): Organize a Python sales analysis project with separate folders for code, data, and output — the same layout professionals use every day. - [How Python Finds Files and Modules: Paths Explained](https://fastapi2day.codewithsiva.dev/practical-python/python-paths.md): Understand Python's current working directory, sys.path, absolute vs relative imports, and how to fix the most common path errors. - [Pydantic Introduction: Runtime Data Validation in Python](https://fastapi2day.codewithsiva.dev/pydantic/introduction.md): Learn what Pydantic is, why Python's dynamic typing creates real-world bugs, and how Pydantic solves them with runtime validation and type safety. - [Pydantic Nested Models: Composing Complex Data Structures](https://fastapi2day.codewithsiva.dev/pydantic/nested-models.md): Compose Pydantic models inside other models, work with lists of models, and parse complex nested JSON into fully validated Python objects. - [Pydantic Settings: Type-Safe Application Configuration](https://fastapi2day.codewithsiva.dev/pydantic/pydantic-settings.md): Use BaseSettings to load and validate app configuration from environment variables and .env files with full type safety and secret handling. - [Pydantic Validation and Fields: A Constraints Guide](https://fastapi2day.codewithsiva.dev/pydantic/validation-and-fields.md): Use Field constraints like min_length, ge, and pattern plus custom validators to control exactly what data your Pydantic models accept. - [Your First Pydantic Model: A BaseModel Basics Guide](https://fastapi2day.codewithsiva.dev/pydantic/your-first-model.md): Learn to define a Pydantic BaseModel subclass, declare typed fields, create instances, handle validation errors, and convert models to dicts and JSON. - [Python for AI & FastAPI: Complete Course Route Map](https://fastapi2day.codewithsiva.dev/route-map.md): Navigate the complete Python for AI & FastAPI course syllabus — every module, topic, and sub-topic with direct links to all learning materials. - [Advanced SQL: Normalization, ACID, and Window Functions](https://fastapi2day.codewithsiva.dev/sql/adv-sql.md): Understand database normalization (1NF–3NF), ACID transaction properties, and powerful window functions like RANK and ROW_NUMBER. - [DQL: Querying and Analyzing Your Data with SQL SELECT](https://fastapi2day.codewithsiva.dev/sql/dql.md): Master the SQL SELECT statement — filtering with WHERE, sorting, grouping with GROUP BY, aggregating data, and understanding execution order. - [Introduction to Databases, DBMS & SQL Fundamentals](https://fastapi2day.codewithsiva.dev/sql/intro.md): Learn the fundamentals of databases, DBMS, relational vs NoSQL systems, SQL basics, and key concepts like primary and foreign keys. - [SQL Joins: Combining Data Across Relational Tables](https://fastapi2day.codewithsiva.dev/sql/joins.md): Learn how INNER JOIN and LEFT JOIN work to combine related tables, with practical examples using the employee and department tables. - [Setting Up Your SQLite Practice Database in VS Code](https://fastapi2day.codewithsiva.dev/sql/sqlite-dbsetup.md): Install the SQLite VS Code extension, create an employee database, populate it with 25 sample records, and verify everything is working. - [SQLite, DDL & DML: Define and Manipulate Your Data](https://fastapi2day.codewithsiva.dev/sql/sqlite-ddl-dml.md): Explore SQLite's features and data types, then master DDL commands (CREATE, ALTER, DROP) and DML commands (INSERT, UPDATE, DELETE). - [Working with Data, Charts, and Caching in Streamlit](https://fastapi2day.codewithsiva.dev/streamlit/data-handling.md): Load CSV files, display and filter Pandas DataFrames, run NumPy calculations, and render Matplotlib charts inside your Streamlit app. - [Displaying Text, Tables, and Media in Streamlit Apps](https://fastapi2day.codewithsiva.dev/streamlit/displaying-content.md): Render text, markdown, headers, tables, DataFrames, images, code blocks, JSON, and status messages inside your Streamlit application. - [Introduction to Streamlit: Python Web Apps Without HTML](https://fastapi2day.codewithsiva.dev/streamlit/intro.md): Learn what Streamlit is, how its rerun execution model works, and how to create and run your first interactive Python web application. - [Building a Complete Streamlit Student Dashboard App](https://fastapi2day.codewithsiva.dev/streamlit/streamlit-app.md): Build a complete Student Performance Analytics Dashboard step-by-step, combining file upload, filters, session state, tabs, and charts. - [Streamlit Widgets: Collecting and Handling User Input](https://fastapi2day.codewithsiva.dev/streamlit/widgets.md): Learn how to use Streamlit buttons, text inputs, selectboxes, sliders, file uploaders, and date pickers to collect input from your users. - [Managing Secrets with .env Files in Python Projects](https://fastapi2day.codewithsiva.dev/tools/environment/dotenv.md): Use python-dotenv to load environment variables from a .env file, and learn the rules and patterns that keep your secrets off GitHub permanently. - [Managing Environment Variables and App Secrets in Python](https://fastapi2day.codewithsiva.dev/tools/environment/index.md): Learn how to keep API keys, passwords, and configuration values out of your source code using environment variables and .env files safely. - [Understanding Environment Variables in Python Projects](https://fastapi2day.codewithsiva.dev/tools/environment/variables.md): Learn what environment variables are, why they matter for keeping secrets safe, and how to read and set them from Python using the os module. - [How to Clone and Create Your Own GitHub Repositories](https://fastapi2day.codewithsiva.dev/tools/git/clone-create.md): Learn how to download any GitHub project to your machine and publish your own Python projects to GitHub for backup, sharing, and portfolio building. - [Setting Up Your GitHub Account and Local Git Config](https://fastapi2day.codewithsiva.dev/tools/git/github-setup.md): Create your GitHub account, configure Git with your identity, and choose the right authentication method for pushing and pulling code. - [Git & GitHub: Version Control for Python Developers](https://fastapi2day.codewithsiva.dev/tools/git/index.md): Learn how Git and GitHub let you save your work, experiment safely, and share Python projects with employers and collaborators online. - [Understanding Version Control with Git: Core Concepts](https://fastapi2day.codewithsiva.dev/tools/git/version-control.md): Discover how Git solves the chaos of manual file versioning and learn the core concepts and everyday commands every developer needs to know. - [Using Git Visually in VS Code's Source Control Panel](https://fastapi2day.codewithsiva.dev/tools/git/vscode-git.md): Stage, commit, push, and pull your code using VS Code's built-in Source Control panel — no terminal commands required for everyday Git tasks. - [Essential Developer Tools for Python and AI Projects](https://fastapi2day.codewithsiva.dev/tools/index.md): Master the professional tools every Python developer needs: Git for version control, environment variables for secrets, and modern package management. - [Complete Python Project Setup with uv: Step-by-Step](https://fastapi2day.codewithsiva.dev/uv/complete-setup.md): Follow a step-by-step end-to-end guide to create, configure, and push a Python project using uv, VS Code, environment variables, Git, and GitHub. - [uv: Modern Python Package Manager — Section Overview](https://fastapi2day.codewithsiva.dev/uv/index.md): Discover uv, the blazing-fast all-in-one Python package manager written in Rust that replaces pip, venv, pip-tools, and pyenv in a single tool. - [Introduction to uv: Faster Python Package Management](https://fastapi2day.codewithsiva.dev/uv/uv-intro.md): Learn what uv is, see a direct speed comparison with pip, understand why it's written in Rust, and install it on Windows, macOS, or Linux. - [Managing Virtual Environments and Packages with uv](https://fastapi2day.codewithsiva.dev/uv/virtual-env.md): Learn how uv creates and manages virtual environments automatically, and how to add, remove, and update packages using the uv add and uv sync commands. - [Complete Python Project Setup: A Step-by-Step Guide](https://fastapi2day.codewithsiva.dev/weather-project/complete-setup.md): Follow this checklist to set up every new Python project correctly with uv, environment variables, Git, and a GitHub remote in under 10 minutes. - [Modern Python Development with uv](https://fastapi2day.codewithsiva.dev/weather-project/index.md): Discover uv, the blazing-fast Python package manager that replaces pip, venv, and pip-tools with a single, consistent tool you can use everywhere. - [Why uv Is the Future of Python Packaging](https://fastapi2day.codewithsiva.dev/weather-project/uv-intro.md): See how uv outperforms pip with 10–100x faster installs, a simpler workflow, and one tool that replaces the entire pip ecosystem. - [Creating and Managing Python Projects with uv](https://fastapi2day.codewithsiva.dev/weather-project/virtual-env.md): Use uv to initialize a Python project, add packages, understand pyproject.toml and lock files, and run your scripts the modern way. - [Weather Data Analysis Project with APIs and Python](https://fastapi2day.codewithsiva.dev/weather-project/weather-data-analysis-project.md): Build a complete Python project that fetches 7 days of weather data from a real API, analyzes it with pandas, and visualizes it with matplotlib.