Do you want to build APIs using Python? I'll show you how.
The developer experience and speed of development with FastAPI means you can build a complete, high-performance API in days, and adding new features is blazing-fast.
In this course, I'll show you how to build a social media API with user authentication. Users will be able to register and log in using Bearer (JWT) tokens. They will be able to create posts, leave comments, and like existing posts.
You'll learn how to use background tasks in FastAPI to improve performance when running slow code, such as when sending emails (which we also do).
Throughout the course we use an async database library, again to maximise performance, which is nonetheless straightforward to use. You'll learn about the different types of data relationships and how to model them.
I'll also show you how to handle file uploads and how to store them securely in a third party service, so you don't use up your own server space.
Finally, 100% of the code in this course has tests. You'll use pytest extensively to write integration and unit tests for the API. You'll learn about pytest fixtures, parametrization, and testing conventions. You'll also learn extensively about logging using the built-in Python module.
Of course, I'll show you how to deploy your FastAPI app using popular service Render.com. I'll share how to do it for free, and also how to improve performance and developer experience by going with paid options.
If you use or want to use FastAPI, this course contains everything you need to develop complete, professional-grade APIs!
Gain broad experience with FastAPI
Understand how to test FastAPI apps using Pytest with 100% test coverage
Become a master of logging with the built-in logging module
Add user authentication with password hashing and Bearer tokens
Use an async SQL database and model one-to-many and many-to-many relationships
Send user emails when they register without a performance hit using background tasks
Handle file uploads and store them in a third-party service
Deploy your FastAPI apps to the cloud using Render.com
Course Introduction
7 LESSONS
Working with FastAPI
7 LESSONS
Introduction to pytest
6 LESSONS
Working with async databases
9 LESSONS
Introduction to working with databases
Installing requirements for async databases in FastAPI
Creating a config file using pydantic
Different configurations per environment in FastAPI apps
Config caching and how to get the config object
Async database setup with FastAPI
Database connection with lifespan events in FastAPI
Run your FastAPI tests in 'test' mode
Using a database in our FastAPI router
Logging in FastAPI applications
14 LESSONS
Introduction to logging
Python logging: loggers, handlers, and formatters
Logger hiererachies and name
Adding Logging Configuration for FastAPI Applications
How to configure multiple loggers in the logging module
Adding File Handlers for Saving Logs
Add logging to your FastAPI endpoints
Python logging: filters and custom filters
Logging HTTPExceptions with an Exception Handler
Identifying logs from the same request: Correlation ID
Adding JSON-formatted log files
Obfuscating email addresses in logs using a custom filter
Adding Logtail for Cloud Logging in FastAPI
Enabling Logtail only in production
User authentication with FastAPI
12 LESSONS
Introduction to user authentication
Installing requirements and, what are JWTs?
Adding a users table and retrieving users by email
Adding user registration and tests
Adding tests for the user registration endpoint
How to hash passwords with passlib
Generate the access token
Retrieve the current user with their token
Use the current user in the API router
Dependency injection: getting the user
Adding user relationships to other tables
(Optional) OAuth Password Bearer and Swagger Auth
Many-to-many relationships
5 LESSONS
User email confirmation
8 LESSONS
Creating the confirmation token
Decoding the confirmation token
Adding a user confirmation endpoint
Requiring user confirmation for authenticated requests
Mailgun set-up and configuration
Sending emails and testing with Python
Sending a confirmation email on registration
Sending emails with background tasks
File Uploads with FastAPI
5 LESSONS
Image Generation with Background Tasks
4 LESSONS
FastAPI Deployments and Application Management
5 LESSONS
6 More Sections
Jose Salvatierra
Hi, I'm Jose! I love helping students learn to code and master software development. I've been teaching online for over 7 years, and I founded Teclado to bring software development to everyone—my objective is for you to truly understand everything that goes on behind the scenes.
How does the course work? When does it start and end?
Do I get lifetime access if I buy the course?
Is this course suitable for beginners?
What tools and technologies are used in this course?
What support is available while taking the course?
Is this course available on Udemy? How is it different from buying it here?