
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Learn to build RESTful and full-stack applications with FastAPI, from zero to live deployment, with fundamentals, Python refreshers, quizzes, and supportive, responsive instruction.
Watch all videos and complete each section first to gain practical examples, then answer exercises before viewing solutions, search for additional information, and use the Q&A with the responsive instructor.
Explore the Python refresher section designed as a reference guide for beginners and developers, covering both advanced and beginner concepts to strengthen FastAPI and web development skills for a resume.
Check your Python version on Mac terminal with python3 --version or on Windows with python --version. FastAPI requires Python 3.7, and the video notes 3.11.2 as current.
Install Python on Windows, download from python.org, add Python to path, install, verify Python version, run hello world, and prep for fast API setup.
Download Python 3.11.2 for macOS from python.org, install it, verify the version in the terminal, and run a hello world script to bring you one step closer to fast API.
Understand how a Python integrated development environment (IDE) combines a source code editor, terminals, build tools, and debuggers to help you write software efficiently, with PyCharm used in this course.
Install and configure PyCharm, the integrated development environment, on Mac and Windows, create a Python project, manage files, and run print statements to verify output.
Master Python variables by printing and reassigning values, explore ints, floats, and strings, and compute the price of an item with tax to understand data types and operations.
Learn how Python comments hide code, using hash signs and triple quotes to create single- and multi-line comments, and understand their impact on program output.
Learn to solve assignment by calculating money left after buying a $15 item with 3% tax from $50. Create variables money, item, tax, or use expression to get 34.55.
Learn string formatting in Python by creating string variables, printing with print, and using concatenation, f-strings, and the format method to display outputs like Hi Eric and Hi Eric Robbie.
learn to collect user input in python with input and two variables. print a greeting that uses an f-string with the name and days before your birthday.
Practice converting user input from string to integer to safely compute weeks until a birthday by dividing by seven, and learn to use round for precision.
Master Python lists by creating and manipulating collections of numbers and strings, learning indexing (including negative indexing), length, slicing, and common operations like append, insert, remove, pop, and sort.
Learn how sets and tuples work in Python, with sets being unordered and unique, and tuples being ordered and immutable, plus basic operations like discard, clear, add, and update.
Build a list named zoo with five animals, remove the third, append a lizard, remove the first, then print all and the first three with slicing.
Explore Python flow control with if, else, and elif statements, using print outputs to demonstrate conditions, indentation, and multiple branches for terms like good morning, good afternoon, and good night.
Define a grade variable between 0 and 100 and use if-elif-else statements to print the letter grade (A, B, C, D) in Python.
Master for and while loops in Python by iterating over lists and ranges, using break, continue, and else, and computing sums and string iterations to build practical loop skills.
Explain how to implement a nested loop that prints a list three times while skipping Monday, using a while loop with an inner for loop, and adding dashes for readability.
Explore dictionaries in Python, learning keys and values, common operations like get, print, length, pop, and clear, and how copying affects memory management.
Learn to manipulate Python dictionaries by copying a vehicle dictionary, adding a number of tyres key set to four, removing the mileage key, and printing all keys and values.
Master Python functions by defining with def, passing parameters, returning values, and understanding local and global scope through practical examples like print, named arguments, and function composition.
Learn to write a function that takes three parameters: first name, last name, and age, and returns a user dictionary, including a demonstration with Eric, Robbie, and 32.
Learn how imports in Python connect separate files into a modular project, alias modules, and use the standard library, including random and math, to build maintainable code.
Explore object oriented programming by defining objects with state and behavior, creating a class to model a dog, and applying the four pillars: encapsulation, abstraction, inheritance, and polymorphism.
Explore object oriented programming by building a small arena game with an enemy class, health points, and attack damage, featuring zombie and ogre types and OOP pillars.
Learn object oriented programming in Python by building a battle arena with an enemy class, defining type, health points, and attack damage, and instantiating enemies.
Explore abstraction in Python's object oriented programming by using an interface to hide implementation, enabling simple, reusable code and scalable objects through methods like talk, walk, and attack.
Explore abstraction in Python's object oriented programming by adding hidden functionality to an enemy object, defining methods like talk, walk forward, and attack, and setting the enemy type to zombie.
Explore python constructors, including default, no-argument, and parameter constructors, and how __init__ uses self to set health points, attack damage, and type such as zombie.
Explore Python constructors, including empty (default), parameter list, and parameterized forms, and learn how __init__ initializes instance attributes like health points and attack damage using self.
Learn encapsulation, the second pillar of object oriented programming, by turning public attributes private with double underscores and using getters and setters in Python.
Learn how encapsulation makes certain Python object attributes private using double underscores, and expose them safely with a getter method to control access to a type of enemy.
Explore how inheritance lets a child class inherit attributes and methods from a parent animal class, override behavior, and extend with dog and bird examples.
Explain self and super in Python objects, show how to differentiate instance variables from parameters, and use super to call the parent constructor, illustrated by a student subclass example.
Implement inheritance by creating zombie and ogre as subclasses of the enemy parent class, using the super constructor, encapsulation, and method overriding for talk and spread disease.
Master inheritance in Python by creating zombie and ogre as child classes of enemy, using super to initialize, overriding talk, and adding new behaviors like spread disease.
Explore polymorphism in python, the final pillar of object-oriented programming, where an animal type holds dog, bird, or lion at runtime, and each overrides talk to bark, chirp, or roar.
Implement polymorphism by creating a battle function in main.py that calls e.talk and e.attack for any enemy, demonstrated with zombie and ogre. It shows polymorphism with zombie and ogre.
Explore polymorphism in Python by using a shape hierarchy and enemies like zombie and ogre to demonstrate a battle function that accepts a generic enemy.
Add a no-special-attack method to the enemy base class and implement zombie and ogre special attacks with random chances, including zombie regenerating 2 hp and ogre increasing attack by 4.
Create a Python turn-based battle between a zombie and an ogre, with 50% chance to heal 2 HP and 20% chance to boost attack when enraged, driven by random.
Explore composition in object-oriented design by building objects that contain other objects, illustrating a has-a relationship with vehicle and engine, and contrasting it with interfaces.
Implement composition by creating a hero that has a weapon with a type and an attack increase, boosting attack damage when equipped in the battle arena against a zombie.
Explore composition by creating a hero and weapon class, equipping a weapon to boost attack damage, and examine the four pillars of object oriented programming: abstraction, encapsulation, inheritance, and polymorphism.
Explore FastAPI, a Python web framework that delivers lightning-fast performance with built-in data validation, serialization, and automatic documentation, enabling rapid development of secure restful and full-stack APIs.
Explore how Python virtual environments isolate project dependencies, enabling separate setups for FastAPI, artificial intelligence, and IoT projects. Learn to create, activate, and install packages with pip inside a venv.
Create and activate a Windows virtual environment for FastAPI, install FastAPI and uvicorn, verify with pip list, and prepare for building the first API endpoint.
Create and activate a dedicated virtual environment on Mac for a fast API project, then install fast API and unicorn inside it and verify with pip list.
Build a books API with FastAPI that stores title, author, and category, implements CRUD via HTTP methods, and uses Swagger docs.
Learn how to build a FastAPI application using the GET request method, define an api endpoint with app.get, and expose a /books endpoint served by uvicorn.
Set up a virtual environment, configure the interpreter, and create a fast API endpoint with uvicorn to return a hello message at /api endpoint. Run and test it.
Enhance the API by returning a list of six books with titles, authors, and science, history, and math categories, exposed via a /books endpoint and documented with Swagger.
Explore path parameters in FastAPI, including static and dynamic paths, endpoint ordering, and how to extract a dynamic param from a URL like /books/{book_title} with spaces encoded.
Explore path parameters in fastapi by creating api endpoints like /books/{dynamic_param}, typing parameters to string, and handling order to distinguish static and dynamic paths.
Learn how query parameters filter resources and can work with path parameters in FastAPI, illustrated with /books?category=science and a read category by query function.
Learn how to filter data with query parameters in FastAPI, filtering books by category and combining path and query parameters, with Swagger UI automatically documenting the endpoints.
Explore how to use the post request method to create data in a FastAPI app by sending a new book in the request body to the /books/create book endpoint.
Explore post requests in FastAPI by sending a request body to create a new book at /books/create_book, with title, author, and category, and append it to the books list.
Learn how put requests update existing data with a body, unlike post which creates data, and see an async update_book function that loops through books to replace a matching title.
Use a FastAPI put request to update an existing book by sending an updated book body, matching on the title, and updating the author and category while preserving the title.
Create a delete request endpoint in fastapi that uses a path parameter to delete a book from a list by title, looping until a match and breaking.
Implement a delete request in FastAPI using a path parameter to remove a book from the list, and verify updates with Swagger UI.
Develop a FastAPI endpoint to return all books by a specific author using path and query parameters, and learn how parameter order affects routing and endpoint behavior.
Extend the book API with get, post, put, delete endpoints; implement data validation, status codes, exception handling, swagger configuration, modeling a Book class with id, title, author, description, and rating.
Develop a FastAPI project two by implementing get, post, put, and delete. Define a book model with id, title, author, description, and rating, expose /books with sample data and Swagger.
Create a post request to add a book via a body parameter, append it to the in-memory books list, and plan validation to enforce rating and IDs in next video.
Implement pedantics data validation in a FastAPI app by creating a book request model with field validation, converting it to a book via dictionary expansion, and updating the endpoint.
Learn to validate post requests in FastAPI using Pydantic models; create a book request, validate fields, transform to a book, and append to the list.
Learn field level validation in FastAPI using a Pydantic base model and field to enforce min lengths, description limits, rating 0–5, and optional id via typing Optional.
Configure FastAPI Pydantic models by defining field constraints for book requests, make id optional with a none default, and use model config to set JSON schema examples.
Create a FastAPI endpoint to fetch a book by id with a get route /books/{book_id}, using an async read_book function that returns the matched book.
Create a FastAPI endpoint that filters books by rating with a query parameter, returning results via read_book_by_rating and noting how it differs from a path parameter.
Update a book in FastAPI with a put request that consumes a book body and updates the item by id, demonstrating status code 200 and future exception handling.
Develop a delete endpoint in FastAPI using a path parameter to remove a book by id from the books list, returning a 200 status and a null response.
Add a publish date field to book and book request, validate it, and extend all endpoints to support filtering by publish date with a new get by date endpoint.
Learn to validate FastAPI path parameters using the path function to require positive book IDs and handle unprocessable entity errors, covering get and delete endpoints.
Learn how to validate query parameters in FastAPI by constraining book ratings to 1–5 and published dates to 1999–2031, mirroring path parameter validation.
Explore http status codes for api endpoints, understanding how 200, 201, 204, 400, 401, 404, 422, and 500 communicate request outcomes between client and server.
Implement http exceptions in fastapi to return 404 not found with detail item not found for book ids, and raise 404 during update or delete when no matching book found.
Learn to set explicit status codes for FastAPI endpoints using Starlette status, detailing 200, 201 created, and 204 no content across get, post, put, and delete.
Advance project three by using a full sql database with sqlite, postgres, and mysql, implement JWT authentication, password hashing, and a to-dos model with admin roles.
Discover how SQL drives relational databases, define what a database and a DBMS are, and perform create, read, update, and delete operations using SQLite, MySQL, and PostgreSQL in FastAPI.
Create a todo app using FastAPI, connect to a sqlite database with SQLAlchemy by building database.py, configuring engine, connect_args, SessionLocal via sessionmaker, and declarative_base for future tables.
Create a SQLAlchemy model for the to dos table by extending the base from database, and define id, title, description, priority, and complete columns with types and a default.
Build a FastAPI app that auto creates a SQLite database and todos table using SQLAlchemy, via engine and metadata create_all, then run uvicorn to populate and query records.
Install sqlite3 on Windows by downloading sqlite tools win32 x86 from sqlite.org, extracting them, placing them on the C drive, updating path, and verifying with sqlite3 in the command prompt.
Learn to install Homebrew on macOS, verify SQLite3 with brew list, install SQLite if needed, run SQLite3 in the terminal, and quit, enabling database manipulation in your FastAPI project.
Discover how to manage a to-do SQL table with insert, select, update, and delete queries, using auto-incremented ids, where clauses, and the SQLAlchemy abstraction.
Master SQLite3 in the terminal to manage a to-dos database: view the schema, insert tasks, run selects, adjust display modes, and delete items by id.
Create a FastAPI endpoint to fetch all todos from the database using a dependency-injected session; manage the database connection with yield to open on request and close after.
Learn to fetch a single todo by id in FastAPI using dependency injection, path validation, and explicit status codes, including 404 handling.
Create a post endpoint to save a new to do to the database, validating title, description, and priority, and rely on an auto-incremented id for the record.
Implement a FastAPI put endpoint to update a todo by id, validate the path, fetch and modify the todo with SQLAlchemy, and save changes, returning 204 or 404.
Implement a delete endpoint for todos in a FastAPI project using a db dependency, validate id, return 204 on success and 404 if not found, and commit the change.
Discover how to modularize authentication and authorization in a FastAPI app by creating an auth.py module, adding endpoints, and considering routing for scalable, maintainable code.
Refactor authentication into a dedicated router and include it in the main app to scale FastAPI projects. Use api router and include_router with uvicorn to expose auth and todo endpoints.
Create a new to dos router file and wire it into main.py by including the to dos router alongside the auth router for a scalable, maintainable FastAPI app.
Explore one-to-many relationships by linking a user table to a tattoos (to-dos) table with an owner foreign key, enabling multiple tasks per user.
Explore how foreign keys link to-dos and users in a one-to-many relation, using where clauses and future JWT-based user IDs to fetch user-specific records in FastAPI.
Create a users table and link dos to their owner via a foreign key, enforce unique emails and usernames, and store hashed passwords with an active flag.
Convert the create user endpoint in auth.py to a post request, define a pydantic create user request model, map its fields to the user model, and prepare for password hashing.
Hash user passwords with bcrypt in a FastAPI project, install pathlib and bcrypt (4.0.1), set up a bcrypt context, and store the hashed password for secure login.
Save the created user to the database using a db dependency, commit the transaction, hash the password with bcrypt, and set is_active to true with admin role.
Learn to implement FastAPI user authentication by creating a /token endpoint that accepts username and password via OAuth2 password request form, authenticates with bcrypt, and returns a JWT.
Explore how Json web tokens use header, payload, and signature to carry claims like sub and exp, enabling bearer authorization in microservices.
Install python-jose and configure a secret with hs256 to generate a jwt after authentication, then implement a token model and return a bearer access token with expiration.
Decode a JSON Web Token (JWT) to verify authentication and secure API endpoints by validating the bearer token, payload, and current user using the secret key and algorithm.
Enhance authentication by returning 401 unauthorized for invalid users and implementing oauth2 password bearer with jwt tokens, while organizing auth endpoints under /auth for clearer swagger grouping.
Welcome to the #1 BEST SELLING FASTAPI course on Udemy!
Learn how to BUILD and DEPLOY FastAPI applications from scratch! Including RESTful APIs and Full Stack applications!
---
FastAPI and Python are two of the hottest technologies in the market for building high performing APIs.
By the end of this course, you will have built production ready RESTful APIs, a production ready Full Stack application, full authentication/ authorization, setup production ready databases, and deployed your FastAPI application so the world can use YOUR app.
---
Understanding and knowing how to build APIs with FastAPI and Python can improve the job you have, get you a new job or even create multiple contract roles! These skills are are needed everywhere, and some of the highest paying job postings are asking for Python developers with FastAPI experience.
In this complete FastAPI course I will quickly get you up to speed, by walking you through the FastAPI framework from the beginning to the end! Whether you are interested in expanding your current craft, want to change careers or simply wanting to learn a very popular topic, then this course is for you! You will be using modern technologies including: PyCharm, Python, FastAPI, bcrypt password hashing, and JSON Web Tokens (JWT)
Why is FastAPI the fastest growing Python web development framework in the market?
To make it simple, FastAPI covers all aspects of APIs. FastAPI comes with a lot out of the box, and is one of the fastest and highest performing web frameworks available. This makes web development rapid, while making use of one of the most popular programming languages in the world, Python.
This course is designed with beginners in mind! This means no matter what kind of background you come from, you will be able to learn one of the hottest frameworks in the market. All you need is some basic python knowledge, and you will be off creating APIs from scratch protected behind JSON Web Tokens (JWT)
---
In this course, you will get (not only):
- All source code is available for download
- Responsive Instructor: All questions answered within 24 hours
- Professional video and audio recordings (check the free previews)
- High quality closed-captions / subtitles available for English (new!)
---
Content and Overview:
Install & Setup Python, IDE & FastAPI
Overview of FastAPI Projects
Installation of a virtual environment for your FastAPI project
Create the HTTP Request Methods (GET, POST, PUT, DELETE)
Data Validation
HTTP Response Status Codes
Working with dynamic data and models
Save dynamic data to Database
Handling user input & forms
Advanced features like Registration, Authentication (bcrypt) & Authorization (JWT)
Database relationships (CASCADE, etc)
Setup production database (MySQL)
Routing
Testing (Unit & Integration) pytest library
Full Stack Development
Deploy your application so the world can use it
And more!
Course videos are regularly updated to keep up with the newest updates and information. The codingwithroby community is very active, so always know that if you have a question you will receive an answer within 24 hours!
---
See what other students are saying about my courses!
"I have been looking for a good API and Web Services course and this has by far exceeded my expectations. Thank you for creating an information, easy to follow course."
"The instructor makes the concept easy to understand and learn."
"Eric is a great instructor and broke down everything about Django to get me started with building my first web application. I highly recommend this course. I have learned more than I was expecting and easier than I thought!"
"The course taught me the basics needed to be able to program using python. All the things taught here are very helpful to me and I used them regularly."
"Clear, crisp and covered a wide array of topics on python. Thanks Eric for the course."
"Eric has done a great job explaining core concepts and how they relate with Django and Python."
---
No Risk – Money-Back Guarantee
Finally, there is no risk. Once you purchase the course, if for some reason you are not happy with the course, Udemy offers a 30-day money back guarantee.
So you have nothing to lose, sign up for this course and learn how to build APIs using FastAPI and Python!
It is time to level up your career and become a Python API developer!
Target Audience
Basic Python knowledge
No experience required for FastAPI. I will teach you FastAPI from the beginning.