# KodeKloud: Beta Courses Python API Development with FastAPI

## Python API Development with FastAPI

### Introduction

- [Introduction](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Introduction/Introduction/page.md): This lesson guides you in building high-performance APIs with FastAPI, covering database interaction, authentication, testing, deployment, and CI/CD pipelines.
- [The app that we will be building](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Introduction/The-app-that-we-will-be-building/page.md): This guide details building a social media app using FastAPI, covering user authentication, CRUD operations, and voting features.

### Python Setup

- [Mac Install Vscode Setup](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Python-Setup/Mac-Install-Vscode-Setup/page.md): This guide covers installing Python and setting up Visual Studio Code on a Mac for Python programming with FastAPI.
- [Windows Setup](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Python-Setup/Windows-Setup/page.md): This guide provides step-by-step instructions to install Python and Visual Studio Code on a Windows machine for Python API development with FastAPI.
- [Venv Basics](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Python-Setup/Venv-Basics/page.md): This article explains how to create and manage virtual environments in Python to isolate project dependencies and prevent version conflicts.
- [Windows Venv](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Python-Setup/Windows-Venv/page.md): Learn to set up a virtual environment on Windows using Visual Studio Code to isolate project dependencies from the global Python installation.
- [Venv Mac](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Python-Setup/Venv-Mac/page.md): This article guides setting up a virtual environment on a Mac using Visual Studio Code for project dependency isolation.

### FastAPI Basics

- [Initialize Fastapi Projects](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/FastAPI-Basics/Initialize-Fastapi-Projects/page.md): Learn to set up a FastAPI project and run a simple web server with installation and application creation instructions.
- [Path Operations](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/FastAPI-Basics/Path-Operations/page.md): This article explains how to define and understand Path Operations in FastAPI, including components, HTTP methods, and examples.
- [Setting Up Postman](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/FastAPI-Basics/Setting-Up-Postman/page.md): This article explores using Postman to test APIs, focusing on advanced HTTP methods like PUT and PATCH for efficient endpoint testing.
- [Post Requests](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/FastAPI-Basics/Post-Requests/page.md): This guide explores POST requests in FastAPI, detailing how to send data to the server for processing.
- [Schema Validation Pydantic](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/FastAPI-Basics/Schema-Validation-Pydantic/page.md): Learn to enforce strict data schemas for API endpoints using FastAPI and Pydantic, ensuring secure and validated client data.
- [Crud Basics Best Practices](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/FastAPI-Basics/Crud-Basics-Best-Practices/page.md): This article explores CRUD applications and outlines best practices for designing API endpoints for Create, Read, Update, and Delete operations.
- [Create Posts](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/FastAPI-Basics/Create-Posts/page.md): This article discusses refactoring FastAPI code to align with RESTful principles and standardizing API endpoint naming conventions.
- [Postman Saving Posts Collections](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/FastAPI-Basics/Postman-Saving-Posts-Collections/page.md): This article explains how to save HTTP requests in Postman collections for persistence and organization between sessions.
- [Get One Post By Id](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/FastAPI-Basics/Get-One-Post-By-Id/page.md): This guide introduces functionality to retrieve a single post by its ID in a CRUD application using FastAPI.
- [Path Order Matters](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/FastAPI-Basics/Path-Order-Matters/page.md): This article discusses the importance of route ordering in FastAPI to prevent unexpected behavior and type validation errors.
- [Change Status Codes](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/FastAPI-Basics/Change-Status-Codes/page.md): This article explains how to customize HTTP status codes in FastAPI for better clarity in API responses.
- [Deleting Posts](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/FastAPI-Basics/Deleting-Posts/page.md): This article explains how to implement a DELETE endpoint in FastAPI to remove a post by its ID.
- [Updating Posts](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/FastAPI-Basics/Updating-Posts/page.md): This article explains how to implement the update functionality for posts using the HTTP PUT method in a FastAPI application.
- [Auto Docs](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/FastAPI-Basics/Auto-Docs/page.md): FastAPI provides automatic API documentation, enabling interactive testing and ensuring documentation stays in sync with API changes.
- [Adding Src Directory](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/FastAPI-Basics/Adding-Src-Directory/page.md): This article explains how to restructure a FastAPI project by moving the main file into an "app" directory for better code organization.

### Working with Databases

- [Database Intro](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Working-with-Databases/Database-Intro/page.md): This lesson explores integrating databases with FastAPI applications, focusing on relational databases and PostgreSQL for data persistence and management.
- [Database Windows Install](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Working-with-Databases/Database-Windows-Install/page.md): This article demonstrates how to install PostgreSQL on a Windows machine with a step-by-step walkthrough.
- [Database Mac](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Working-with-Databases/Database-Mac/page.md): This article guides you through the installation of PostgreSQL on a macOS machine.
- [Database Schema And Tables](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Working-with-Databases/Database-Schema-And-Tables/page.md): This article explains the fundamental concepts of database schema, tables, columns, rows, data types, primary keys, and constraints in PostgreSQL.
- [Pgadmin Ui](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Working-with-Databases/Pgadmin-Ui/page.md): This article explores PgAdmin, a GUI for managing PostgreSQL, covering server setup, database creation, table design, and data manipulation.
- [First Sql Query](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Working-with-Databases/First-Sql-Query/page.md): This lesson teaches you to run your first SQL command and essential querying techniques for retrieving and manipulating data in a database.
- [Filter With Where](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Working-with-Databases/Filter-With-Where/page.md): Learn to filter SQL query results using the WHERE clause for specific data retrieval based on conditions.
- [Sql Operators](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Working-with-Databases/Sql-Operators/page.md): Explains SQL comparison and logical operators, covering =, <>, !=, >, <, >=, <=, AND/OR with examples, precedence, common mistakes and best practices for WHERE clauses
- [Sql In Operator](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Working-with-Databases/Sql-In-Operator/page.md): Learn how to simplify SQL queries by using the IN operator in place of multiple OR conditions for cleaner syntax and easier maintenance.
- [Sql Pattern Matching Like Keyword](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Working-with-Databases/Sql-Pattern-Matching-Like-Keyword/page.md): This tutorial demonstrates SQL pattern matching using the LIKE operator with a products database for developers and database administrators.
- [Sql Ordering Results](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Working-with-Databases/Sql-Ordering-Results/page.md): Learn how to order query results in PostgreSQL using the ORDER BY clause for specific column sorting and multiple criteria.
- [Limit Offset](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Working-with-Databases/Limit-Offset/page.md): This article discusses limit-offset pagination techniques for efficiently managing large datasets in database queries.
- [Inserting Data](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Working-with-Databases/Inserting-Data/page.md): This lesson explores how to insert new rows into a PostgreSQL database using SQL queries.
- [Deleting Data](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Working-with-Databases/Deleting-Data/page.md): This guide explains how to delete entries from a database table using SQL and verify successful deletions.
- [Updating Data](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Working-with-Databases/Updating-Data/page.md): This article explains how to update existing rows in a PostgreSQL database using the UPDATE command.

### Databases with Python

- [Setup App Database](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Databases-with-Python/Setup-App-Database/page.md): This guide integrates a PostgreSQL database with a Python/FastAPI application, focusing on setting up a "posts" table for a social media application.
- [Connect To Database Python](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Databases-with-Python/Connect-To-Database-Python/page.md): Learn to connect a Python application to a PostgreSQL database using psycopg2, covering connection setup, SQL execution, error handling, and retry mechanisms.
- [Sql Retrieve Posts](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Databases-with-Python/Sql-Retrieve-Posts/page.md): This article demonstrates retrieving posts from a PostgreSQL database using Python with FastAPI and psycopg2, covering database connection and API endpoint creation.
- [Create Posts Sql](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Databases-with-Python/Create-Posts-Sql/page.md): Learn to create a new post using FastAPI and PostgreSQL while ensuring SQL parameterization and preventing SQL injection.
- [Fetch Post By Id Sql](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Databases-with-Python/Fetch-Post-By-Id-Sql/page.md): This article explains how to retrieve a post by ID from a PostgreSQL database using FastAPI with secure SQL queries.
- [Delete Posts Sql](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Databases-with-Python/Delete-Posts-Sql/page.md): Learn to safely delete a post from a database in a Python API using SQL with parameterized queries to prevent SQL injection.
- [Update Posts](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Databases-with-Python/Update-Posts/page.md): This guide explains how to update a post resource by adding a new path operation that supports modifying posts.
- [Orm Intro](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Databases-with-Python/Orm-Intro/page.md): This article introduces Object Relational Mappers in Python applications, comparing traditional SQL interactions with ORM-based approaches for database management.
- [Sqlalchemy Setup](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Databases-with-Python/Sqlalchemy-Setup/page.md): Integrating SQLAlchemy into a FastAPI project for database connection, model creation, and session utilization.
- [Sqlalchemy Created At Table](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Databases-with-Python/Sqlalchemy-Created-At-Table/page.md): This article explains how to customize a SQLAlchemy table by adding a created_at timestamp column and configuring default values.
- [Sqlalchemy Get All Posts](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Databases-with-Python/Sqlalchemy-Get-All-Posts/page.md): Learn to configure SQLAlchemy with PostgreSQL and query data using raw SQL and ORM in a FastAPI application.
- [Create Post Sqlalchemy](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Databases-with-Python/Create-Post-Sqlalchemy/page.md): Learn to create a new post using SQLAlchemy with FastAPI, transitioning from raw SQL to a more maintainable ORM approach.
- [Get Post By Id Sqlalchemy](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Databases-with-Python/Get-Post-By-Id-Sqlalchemy/page.md): This article explores querying a post by its ID using SQLAlchemy, transitioning from raw SQL for improved efficiency and maintainability.
- [Sqlalchemy Delete Posts](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Databases-with-Python/Sqlalchemy-Delete-Posts/page.md): This article demonstrates implementing a DELETE operation using SQLAlchemy and FastAPI, transitioning from raw SQL to ORM with dependency injection.
- [Sqlalchemy Update Posts](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Databases-with-Python/Sqlalchemy-Update-Posts/page.md): This guide demonstrates updating posts using SQLAlchemy in a FastAPI application, covering querying, validation, updating, and returning results.

### Advanced FastAPI

- [Pydantic Sqlalchemy Models](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Pydantic-Sqlalchemy-Models/page.md): This article clarifies the differences between Pydantic models and SQLAlchemy models in a FastAPI application.
- [Pydantic Models Deep Dive](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Pydantic-Models-Deep-Dive/page.md): Explains extracting and reusing Pydantic schemas in a separate module, using inheritance and response models with orm_mode to produce consistent, documented FastAPI request and response shapes.
- [Pydantic Response Model](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Pydantic-Response-Model/page.md): This article explains how to define Pydantic schema models for shaping API responses in FastAPI, enhancing clarity and security by controlling exposed fields.
- [Creating User Table](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Creating-User-Table/page.md): This article introduces user functionality in an application by creating a user table in PostgreSQL for registration, login, and post creation.
- [User Registration Path Operation](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/User-Registration-Path-Operation/page.md): This article discusses extending a FastAPI application to implement user registration functionality, including endpoint creation, data validation, and response modeling.
- [Hashing User Password](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Hashing-User-Password/page.md): This article explains how to securely hash user passwords before storing them in a database to enhance application security.
- [Get User By Id](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Get-User-By-Id/page.md): This article explains how to set up a FastAPI route to retrieve a users profile information based on their ID.
- [Fastapi Routers](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Fastapi-Routers/page.md): This article explains how to refactor a FastAPI application by organizing endpoints into separate router files for better modularity and maintainability.
- [Router Prefix And Tags](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Router-Prefix-And-Tags/page.md): This article explains how to use router prefixes and tags in FastAPI to simplify route definitions and improve API documentation clarity.
- [Jwt Token Basics](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Jwt-Token-Basics/page.md): This article explains JWT token-based authentication, its structure, and how it enhances security and scalability in API development.
- [Login Process Flow](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Login-Process-Flow/page.md): This article explains the user authentication process during login, detailing credential verification and token generation.
- [Creating A Token](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Creating-A-Token/page.md): Learn to create and manage JWT tokens for authentication in a FastAPI application, covering installation, configuration, token creation, and integration into a login endpoint.
- [OAuth2 Password Request Form](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/OAuth2-Password-Request-Form/page.md): This article explains how to integrate OAuth2PasswordRequestForm in FastAPI for handling user login credentials via form data instead of JSON.
- [Verify User Is Logged In](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Verify-User-Is-Logged-In/page.md): This article explains how to verify user authentication using access tokens and implement protected endpoints in FastAPI.
- [Protecting Routes](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Protecting-Routes/page.md): This article explains how to enforce user authentication in FastAPI to protect routes for creating, deleting, and updating posts.
- [Testing Expired Token](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Testing-Expired-Token/page.md): This guide demonstrates how to verify the JWT expiration mechanism and test access tokens with varying expiration times.
- [Fetching User In Protected Route](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Fetching-User-In-Protected-Route/page.md): Learn to fetch the current user from your database using an access token in a FastAPI application.
- [Advanced Postman Features](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Advanced-Postman-Features/page.md): This article explores advanced Postman techniques for enhancing API testing workflows through environments and automating access token management.
- [Sql Relationship Basics](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Sql-Relationship-Basics/page.md): This article explores establishing relationships in a relational database by connecting a users table with a posts table using foreign keys.
- [Postgres Foreign Keys Configuring](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Postgres-Foreign-Keys-Configuring/page.md): This article demonstrates configuring a foreign key in PgAdmin using related tables, modifying the posts table, and testing its behavior.
- [Sqlalchemy Foreign Keys](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Sqlalchemy-Foreign-Keys/page.md): Learn to establish foreign key relationships in SQLAlchemy to enhance data integrity and manage cascading deletions effectively.
- [Update Post Schema To Include User](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Update-Post-Schema-To-Include-User/page.md): This article discusses updating the post schema to include owner information and necessary adjustments for API functionality.
- [Assigning Owner Id When Creating New Post](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Assigning-Owner-Id-When-Creating-New-Post/page.md): This article explains how to assign the owner ID automatically when creating a new post to avoid SQL errors.
- [Delete Update Only Your Own Posts](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Delete-Update-Only-Your-Own-Posts/page.md): This article explains how to enforce ownership checks for deleting and updating user posts in an application.
- [Retrieve Only Your Own Posts](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Retrieve-Only-Your-Own-Posts/page.md): This article explains how to modify FastAPI endpoints to retrieve only posts created by the authenticated user.
- [Sqlalchemy Relationships](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Sqlalchemy-Relationships/page.md): This article explains how to use SQLAlchemy relationships to automatically fetch related user data when querying posts in a social media application.
- [Query Parameters](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Query-Parameters/page.md): This article explores query parameters in FastAPI for filtering API results, including implementation of pagination and search functionality.
- [Cleanup Main Py File](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Cleanup-Main-Py-File/page.md): This article discusses streamlining the main.py file by removing redundant imports and outdated code snippets for improved clarity and maintainability.
- [Environment Variables](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Environment-Variables/page.md): This guide covers best practices for managing environment variables to enhance application security and adaptability.
- [Vote Like Theory](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Vote-Like-Theory/page.md): This article explores implementing a basic like system for social media applications and discusses key design requirements and database structure.
- [Creating Votes Table Pgadmin](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Creating-Votes-Table-Pgadmin/page.md): Learn to create a votes table in pgAdmin using PostgreSQL commands and SQLAlchemy, including defining foreign key constraints for referential integrity.
- [Votes With Sqlalchemy](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Votes-With-Sqlalchemy/page.md): This article explains how to create a votes table model using SQLAlchemy, including foreign keys and composite primary keys for user and post IDs.
- [Votes Route](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Votes-Route/page.md): This article explains how to set up a voting route in a FastAPI application for handling likes and unlikes on posts.
- [Sql Joins](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Sql-Joins/page.md): This article explains SQL joins, their types, and how to combine data from multiple related tables in queries.
- [Joins Sqlalchemy](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Joins-Sqlalchemy/page.md): Explains building SQLAlchemy joins in FastAPI to fetch posts with vote counts, handle aggregation, pagination, and resolve Pydantic response model mismatches.
- [Get One Post Join](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Advanced-FastAPI/Get-One-Post-Join/page.md): This article explains how to enhance an API endpoint to include vote counts when retrieving individual posts.

### Database Migration

- [What Is Db Migration Tool](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Database-Migration/What-Is-Db-Migration-Tool/page.md): This article explores SQLAlchemys limitations in evolving database schemas and introduces Alembic as a tool for automating and streamlining schema updates.
- [Alembic Setup](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Database-Migration/Alembic-Setup/page.md): This article explains setting up Alembic for migration management with SQLAlchemy in a FastAPI project.
- [First Revision](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Database-Migration/First-Revision/page.md): This article demonstrates managing PostgreSQL database changes using Alembic, including creating tables and handling migrations step-by-step.
- [Rollback Alembic](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Database-Migration/Rollback-Alembic/page.md): This article explains how to create, modify, and roll back database tables using Alembic migrations for effective schema management.
- [Alembic Finish Rest Of Schema](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Database-Migration/Alembic-Finish-Rest-Of-Schema/page.md): This guide explains how to finalize a database schema using Alembic, including creating tables, adding columns, and managing migrations.

### Deployment

- [What Is CORS](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Deployment/What-Is-CORS/page.md): This article explains Cross-Origin Resource Sharing (CORS) and its importance in API development, including how to configure it in FastAPI applications.
- [Setup Git](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Deployment/Setup-Git/page.md): Learn to configure Git for projects, enabling change tracking and establishing a remote repository for code storage to simplify deployment and enhance collaboration.
- [Deploy Heroku](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Deployment/Deploy-Heroku/page.md): This article guides you through deploying a FastAPI application on Heroku, covering setup, configuration, and troubleshooting.
- [Deploy Ubuntu VM](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Deployment/Deploy-Ubuntu-VM/page.md): This guide explains how to deploy a FastAPI application on an Ubuntu server using DigitalOcean, covering setup, configuration, and security steps.
- [Docker](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Deployment/Docker/page.md): Learn to Dockerize a FastAPI application and set up a PostgreSQL database using Docker containers for a reproducible environment.

### Testing

- [Testing Intro](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Testing-Intro/page.md): Automated testing ensures code changes do not break functionality, saving development time and reducing downtime while covering critical functionalities.
- [Writing First Test](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Writing-First-Test/page.md): This guide walks you through creating your first test using the pytest framework, covering installation, writing tests, and understanding assertions.
- [Testing Flags](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Testing-Flags/page.md): Learn how to enhance your testing workflow by using additional Pytest flags for greater insight into your tests.
- [Testing More Functions](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Testing-More-Functions/page.md): This article explores verifying arithmetic operations functionality using automated tests, demonstrating testing for add, subtract, multiply, and divide functions.
- [Parametrize](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Parametrize/page.md): This article explains how to use Pytest parameterization to enhance testing of arithmetic functions by reducing code duplication and improving test coverage.
- [Testing Classes](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Testing-Classes/page.md): This lesson explores testing classes in Python, focusing on the BankAccount class and its methods for deposits, withdrawals, and interest collection.
- [Fixtures](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Fixtures/page.md): Learn to reduce repetitive code in bank account tests using pytest fixtures for efficient test setup and management.
- [Testing Exceptions](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Testing-Exceptions/page.md): This article discusses enhancing the BankAccount class with exception handling for withdrawals to prevent overdrafts and improve error management.
- [Fastapi Testclient](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Fastapi-Testclient/page.md): This tutorial covers testing a FastAPI application using the FastAPI TestClient, including examples for standalone functions and verifying FastAPI routes.
- [Pytest Flags](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Pytest-Flags/page.md): This article explores essential Pytest flags to streamline testing by suppressing warnings and halting execution on the first failure.
- [Create User Test](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Create-User-Test/page.md): This article explains how to create tests for user creation functionality in a FastAPI application using TestClient.
- [Setup Test Database](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Setup-Test-Database/page.md): This article explains how to set up a separate test database in FastAPI to avoid interference with development data during testing.
- [Create Destroy Database After Each Test](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Create-Destroy-Database-After-Each-Test/page.md): This guide explains how to configure tests to use a clean database each time, preventing duplicate data errors during test execution.
- [Setup Test Database With Fixtures](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Setup-Test-Database-With-Fixtures/page.md): This article explains how to set up a test database using fixtures and manage dependencies for efficient testing.
- [Trailing Slashes In Path](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Trailing-Slashes-In-Path/page.md): This article explains the impact of trailing slashes in FastAPI endpoint paths on application behavior and testing outcomes.
- [Fixture Scope](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Fixture-Scope/page.md): This article explores fixture scopes and their impact on testing user creation and login in FastAPI applications.
- [Test User Fixture](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Test-User-Fixture/page.md): This article explains how to create a test user fixture to decouple login tests from external states, improving test modularity and reducing code duplication.
- [Validate Token](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Validate-Token/page.md): This article explains enhancing token validation for user login in FastAPI, ensuring valid tokens and correct user information.
- [Conftest Py File](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Conftest-Py-File/page.md): This article explores organizing test fixtures using a `conftest.py` file for simplified database and client initialization in Pytest.
- [Failed Login Test](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Failed-Login-Test/page.md): This article explores tests for failed login scenarios, ensuring the API handles incorrect or incomplete credentials properly.
- [Get All Posts Test](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Get-All-Posts-Test/page.md): This article demonstrates tests for user authentication and post-related operations in an API, focusing on clarity and maintainability through organized testing practices.
- [Posts Fixture Create Test Posts](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Posts-Fixture-Create-Test-Posts/page.md): This article explains how to create a fixture for adding initial posts to a database for testing purposes.
- [Unauthorized Get Posts](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Unauthorized-Get-Posts/page.md): This article explores errors from unauthorized GET requests to an API when retrieving posts due to missing or incorrect authentication credentials.
- [Get One Post Test](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Get-One-Post-Test/page.md): This article discusses extending a testing suite to verify the retrieval of individual posts, including unauthorized access and handling non-existent posts.
- [Test Create Post](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Test-Create-Post/page.md): This article reviews tests for post endpoints, ensuring proper access control, post creation, and default values.
- [Delete Post](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Delete-Post/page.md): This article explores scenarios for deleting posts using API endpoints, focusing on tests for user authorization and post ownership.
- [Update Post Test](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Update-Post-Test/page.md): This article on testing post update operations helps ensure that your application manages posts securely and reliably.
- [Test Voting](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/Testing/Test-Voting/page.md): This article provides a guide to setting up and running tests for voting functionality in applications, covering various scenarios and edge cases.

### CI/CD

- [CI CD Basics](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/CICD/CI-CD-Basics/page.md): This article explores the benefits of CI/CD pipelines and compares them to traditional manual deployment processes.
- [Configuring First CI CD Pipeline](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/CICD/Configuring-First-CI-CD-Pipeline/page.md): This guide explains how to configure a simple CI/CD pipeline using GitHub Actions for automating tasks in software development.
- [Configuring Python in Pipeline](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/CICD/Configuring-Python-in-Pipeline/page.md): This guide explains how to configure Python in a GitHub Actions pipeline for efficient CI/CD, including installing dependencies and running tests.
- [Environment Variables](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/CICD/Environment-Variables/page.md): This guide explains how to set environment variables in CI/CD workflows for job-specific and global configurations while ensuring security and proper scoping.
- [GitHub Actions Secrets](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/CICD/GitHub-Actions-Secrets/page.md): This article explains how to use GitHub Actions Secrets to securely manage sensitive information in workflows.
- [Adding PostgreSQL Database](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/CICD/Adding-PostgreSQL-Database/page.md): Learn to set up a PostgreSQL database on GitHub Actions using Docker containers for continuous integration.
- [Building Docker Images](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/CICD/Building-Docker-Images/page.md): This guide explains how to create a Docker image in a CI runner and push it to Docker Hub.
- [Implementing Continuous Delivery](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/CICD/Implementing-Continuous-Delivery/page.md): This article explores core concepts and best practices for implementing continuous delivery in software development workflows.
- [Python API Outro](https://notes.kodekloud.com/docs/Python-API-Development-with-FastAPI/CICD/Python-API-Outro/page.md): This article concludes a lesson on building APIs with FastAPI, covering essential topics like authentication, database interaction, deployment, and CI/CD integration.
