We'll build a full-fledged API in Python using FastAPI. We'll also learn the fundamentals of API design including routes, serialisation/deserialisation, schema validation and models. In addition, we'll learn about SQL, testing with pytest
and how to build out a CI/CD pipeline using GitHub Actions.
Section 2: Setup & Installation
Section 3: FastAPI
- 34:17 Install dependencies w/ pip
- 36:21 Starting FastAPI
- 39:23 Path Operations
- 53:22 Intro
postman
- 57:34 HTTP Requests
- 1:07:29 Schema Validation with Pydantic
- 1:22:45 CRUD Operations
- 1:29:44 Storing in Array
- 1:34:06 Creating
- 1:38:15 Postman Collections & saving requests
- 1:39:47 Retrieve One
- 1:48:10 Path order Matters
- 1:52:46 Changing response Status Codes
- 2:01:49 Deleting
- 2:10:31 Updating
- 2:18:02 Automatic Documentation
- 2:21:34 Python packages
Section 4: Databases
- 2:24:11 Database Intro
- 2:28:54 Postgres Windows Install
- 2:31:28 Postgres Mac Install
- 2:34:26 Database Schema & Tables
- 2:44:35 Managing Postgres with PgAdmin GUI
- 3:12:10 Your first SQL Query
- 3:19:43 Filter results with - "where"
- 3:22:55 SQL Operators
- 3:26:38 IN
- 3:28:07 Pattern matching with LIKE
- 3:31:59 Ordering Results
- 3:36:27 LIMIT & OFFSET
- 3:39:21 Modifying Data
Section 5: Python + Raw SQL
Section 6: ORM
Section 7: Pydantic Models
Section 8: Authentication & Users
- 5:50:08 Creating Users Table
- 5:54:50 User Registration Path Operation
- 6:03:27 Hashing Passwords
- 6:08:49 Refactor Hashing Logic
- 6:10:32 Get User by ID
- 6:17:13 FastAPI Routers
- 6:27:34 Router Prefix
- 6:30:31 Router Tags
- 6:32:49 JWT Token Basics
- 6:47:03 Login Process
- 7:00:44 Creating Token
- 7:09:58 OAuth2 PasswordRequestForm
- 7:13:23 Verify user is Logged In
- 7:25:21 Fixing Bugs
- 7:27:59 Protecting Routes
- 7:36:17 Test Expired Token
- 7:38:13 Fetching User in Protected Routes
- 7:42:44 Postman advanced Features
Section 9: Relationships
- 7:50:33 SQL Relationship Basics
- 7:54:59 Postgres Foreign Keys
- 8:07:20
SQLAlchemy
Foreign Keys - 8:13:40 Update Schema to include User
- 8:17:59 Assigning Owner id when creating new
- 8:21:01 Delete and Update only your own
- 8:27:48 Only Retrieving Logged in User's
- 8:33:37
SQLAlchemy
Relationships - 8:38:32 Query Parameters
- 8:50:46 Cleanup our
main.py
file - 8:53:53 Env Variables
Section 10: Vote/Like System
Section 11: Database Migration with `Alembic`
Section 12: Pre-Deployment Checklist
Section 13: Deployment `Heroku`
Section 14: Deployment Ubuntu
- 12:05:04 Create an Ubuntu VM
- 12:08:04 Update packages
- 12:10:47 Install Python
- 12:12:21 Install Postgres & setup password
- 12:17:28 Postgres Config 12:24:50 Create new user and setup python evironment
- 12:34:06 Env Variables
- 12:42:24 Alembic migrations on production database
- 12:45:57 Gunicorn
- 12:54:12 Creating a Systemd service
- 13:04:45 NGINX
- 13:10:45 Setting up Domain name
- 13:15:19 SSL/HTTPS
- 13:19:31 NGINX enable
- 13:20:06 Firewall
- 13:23:47 Pushing code changes to Production
Section 15: Docker
Section 16: Testing
- 14:14:51 Testing Intro
- 14:17:19 Writing your first test
- 14:30:22 The
-s
&-v
flags - 14:31:44 Testing more functions
- 14:35:29 Parametrize
- 14:40:21 Testing Classes
- 14:48:37 Fixtures
- 14:55:40 Combining Fixtures + Parametrize
- 14:59:13 Testing Exceptions
- 15:06:07 FastAPI TestClient
- 15:14:26 Pytest flags
- 15:17:31 Test create user
- 15:25:23 Setup testing database
- 15:36:47 Create & destroy database after each test
- 15:44:18 More Fixtures to handle database interaction
- 15:50:35 Trailing slashes in path
- 15:53:12 Fixture scope
- 16:07:50 Test user fixture
- 16:14:40 Test/validate token
- 16:18:59
Conftest.py
- 16:22:09 Testing
Section 17: CI/CD Pipeline
- 17:34:15 CI/CD intro
- 17:43:29 Github Actions
- 17:49:32 Creating Jobs
- 17:57:38 setup python/dependencies/pytest
- 18:06:14 Env variables
- 18:11:19 Github Secrets
- 18:18:14 Testing database
- 18:23:42 Building Docker images
- 18:34:33 Deploy to heroku
- 18:49:10 Failing tests in pipeline
- 18:52:18 Deploy to Ubuntu