We may earn an affiliate commission when you visit our partners.
Jose Salvatierra

With FastAPI you can build complete, high-performance APIs in days, and adding new features is blazing-fast. That's why FastAPI has become so popular in recent years.

In this course, I'll show you how to go from a blank slate to a complete, finished FastAPI application.

The project

We'll build social media API with user authentication, email sending, and file upload. 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.

Read more

With FastAPI you can build complete, high-performance APIs in days, and adding new features is blazing-fast. That's why FastAPI has become so popular in recent years.

In this course, I'll show you how to go from a blank slate to a complete, finished FastAPI application.

The project

We'll build social media API with user authentication, email sending, and file upload. 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.

We'll use Pydantic for data validation and encode/databases as our database connectivity library.

Advanced knowledge

Use background tasks in FastAPI to improve performance when running slow code, such as when sending emails (covered in the course) or when making slow requests to third party APIs (also covered).

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, including many-to-many relationships.

You'll learn how to handle file uploads and what to do with the uploaded files, so you don't run out of server space.

Complete API testing

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.

Part of real-world development means logging. There's a lot of logging knowledge in this course, including how to set up the logging module properly, when to make logging calls, and where to store logs when your application is deployed.

Deployments

Of course, I'll show you how to deploy your FastAPI app using popular service Render.  You can deploy your FastAPI app for free, but I'll also show you some paid options for improved performance.

We'll also look at application management, error handling with Sentry, and CI/CD with GitHub Actions.

If you use or want to use FastAPI, this course contains everything you need to develop complete, real-world APIs.

Let's get started. I'll see you on the inside.

Enroll now

Here's a deal for you

We found an offer that may be relevant to this course.
Save money when you learn. All coupon codes, vouchers, and discounts are applied automatically unless otherwise noted.

What's inside

Learning objectives

  • 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

Syllabus

Course Introduction
Community
Instructions - Join the Community
Welcome to this course!
Read more

Traffic lights

Read about what's good
what should give you pause
and possible dealbreakers
Uses FastAPI, which has gained popularity for its ability to build high-performance APIs quickly, making it a valuable skill for developers
Employs Pydantic for data validation, which is essential for building robust and reliable APIs, ensuring data integrity and preventing errors
Covers deployment using Render, a popular service, and explores options for improved performance, providing practical knowledge for real-world applications
Includes complete API testing with pytest, emphasizing integration and unit tests, which is crucial for ensuring code quality and preventing regressions
Requires knowledge of Python, which may be a barrier to entry for those unfamiliar with the language, but the course includes a Python crash course
Teaches logging practices, including setting up the logging module and storing logs, which is essential for debugging and monitoring applications in production

Save this course

Create your own learning path. Save this course to your list so you can find it easily later.
Save

Reviews summary

Practical fastapi api development

According to learners, this course provides a strong foundation for building REST APIs using FastAPI, covering essential topics from core concepts to advanced features. Students particularly appreciate the hands-on approach, including practical projects that simulate real-world scenarios. The course is praised for its comprehensive coverage of testing with Pytest, integrating async databases, handling user authentication (including JWTs), and even deployment strategies. While generally well-received, a few reviewers mention that the course might be better suited for those with at least intermediate Python knowledge and that some libraries or dependencies may require minor updates.
Integrates async database usage effectively.
"Working with async databases was clearly explained and integrated seamlessly into the project."
"The course does a great job of introducing and utilizing async database libraries with FastAPI."
"Understanding how to connect FastAPI with an async SQL database was a key learning point for me."
"I found the section on async databases very helpful for building modern, high-performance APIs."
Thorough testing with Pytest is included.
"The section on testing with Pytest is exceptionally well-done and provides a thorough understanding of API testing."
"I really appreciated the detailed coverage of Pytest and how to write effective tests for FastAPI applications."
"Testing is often overlooked, but this course provides solid instruction on using Pytest effectively."
"Learning how to properly test my API endpoints using Pytest was a major takeaway from this course."
Wide range of topics, including testing/auth/deployment.
"This course covers everything you need to know, from setup to deployment, including crucial topics like testing and authentication."
"I was impressed by the breadth of topics covered, including database integration, JWT authentication, and even logging and deployment."
"The course doesn't just teach FastAPI basics; it dives deep into testing with Pytest, async databases, and deployment, which is invaluable."
"It covers a lot of ground - authentication, testing, async databases, deployment - all within the context of FastAPI."
"I feel this course provides a complete picture of building production-ready APIs with FastAPI."
Learn by building a real-world API project.
"The project-based approach to building the social media API is fantastic and really solidified my understanding of how all the pieces fit together."
"Building a complete application throughout the course made the concepts stick better than just theoretical lectures."
"I particularly enjoyed the hands-on coding and projects, which provided valuable practical experience."
"I found the practical examples and the main project incredibly helpful for applying what I learned."
"The course's focus on building a practical, usable API was a major plus for me."
May need minor adjustments for latest libraries.
"Had to make minor adjustments to dependencies due to version changes since the course was published."
"Some libraries used required updating to work with the most recent versions, but the changes were straightforward."
"It's worth checking dependency versions at the start, as some might need slight tweaks."
Best suited for intermediate Python developers.
"While comprehensive, I think this course is best suited for developers who already have a solid grasp of Python fundamentals."
"Beginners might find some parts challenging without prior experience in Python or web development concepts."
"I recommend having at least intermediate Python skills before taking this course to fully benefit from it."

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Mastering REST APIs with FastAPI with these activities:
Review Python Fundamentals
Solidify your understanding of Python fundamentals, including data structures, control flow, and object-oriented programming, to prepare for building APIs with FastAPI.
Show steps
  • Review Python syntax and data types.
  • Practice writing functions and classes.
  • Work through basic Python exercises on platforms like HackerRank or LeetCode.
Read 'FastAPI Quick Start Guide'
Familiarize yourself with the FastAPI framework by reading a quick start guide to understand its core concepts and features.
View Melania on Amazon
Show steps
  • Obtain a copy of the 'FastAPI Quick Start Guide'.
  • Read the book, focusing on the introductory chapters.
  • Try out the code examples provided in the book.
Build a Simple CRUD API
Practice building a basic CRUD (Create, Read, Update, Delete) API using FastAPI to reinforce your understanding of routing, request handling, and data validation.
Show steps
  • Set up a new FastAPI project.
  • Define data models using Pydantic.
  • Implement CRUD operations for a simple resource.
  • Test the API endpoints using a tool like Postman.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Implement Authentication Flows
Practice implementing different authentication flows, such as JWT (JSON Web Token) authentication, to secure your FastAPI APIs.
Show steps
  • Implement user registration and login endpoints.
  • Generate and validate JWT tokens.
  • Protect API endpoints with authentication.
Write a Blog Post on FastAPI Logging
Deepen your understanding of logging in FastAPI by writing a blog post explaining how to configure and use the logging module effectively.
Show steps
  • Research FastAPI logging best practices.
  • Write a clear and concise blog post explaining the concepts.
  • Include code examples and configuration snippets.
  • Publish the blog post on a platform like Medium or your personal website.
Study 'SQLAlchemy'
Expand your knowledge of database interactions by studying SQLAlchemy, a popular Python SQL toolkit and ORM, to gain a deeper understanding of database modeling and querying.
View Essential SQLAlchemy on Amazon
Show steps
  • Obtain a copy of the SQLAlchemy documentation or a relevant book.
  • Study the core concepts of SQLAlchemy, such as ORM and SQL expression language.
  • Experiment with different database operations using SQLAlchemy.
Contribute to a FastAPI Open Source Project
Contribute to an existing FastAPI open-source project to gain practical experience, collaborate with other developers, and improve your coding skills.
Show steps
  • Find a FastAPI open-source project on GitHub.
  • Identify an issue or feature to work on.
  • Submit a pull request with your changes.
  • Respond to feedback and iterate on your code.

Career center

Learners who complete Mastering REST APIs with FastAPI will develop knowledge and skills that may be useful to these careers:
Backend Developer
A Backend Developer is responsible for designing, building, and maintaining the server-side logic and databases that power applications. This course on mastering Representational State Transfer application programming interfaces with FastAPI will give a strong foundation for a Backend Developer. The course teaches how to build complete, high-performance APIs, user authentication, and database modeling using Pydantic and async databases, all critical skills in this role. Furthermore, the course emphasizes testing with pytest, logging, and deployment using Render and GitHub Actions, all crucial for a Backend Developer to ensure the reliability and scalability of the APIs they develop.
API Developer
An API Developer specializes in the creation and maintenance of Application Programming Interfaces which allow different software systems to communicate with each other. This course, which focuses on mastering Representational State Transfer APIs with FastAPI, directly aligns with the core responsibilities of an API Developer. The course covers everything from building the initial API structure to implementing user authentication with bearer tokens, handling file uploads, and deploying the API. The course's extensive coverage of testing with pytest and logging ensures that an API Developer can build robust and reliable APIs. The project of building a social media API, complete with user authentication, email sending, and file upload, will prove useful to those who hope to become API developers.
Software Engineer
Software Engineers design, develop, and test software applications. This course on mastering Representational State Transfer APIs with FastAPI provides practical skills that are applicable to software engineering. The course includes building a complete API with user authentication, handling file uploads, working with async databases, and deploying the application. The course's emphasis on testing using pytest and logging helps a Software Engineer write robust and maintainable code. In particular, learning how to set up the logging module and how to configure multiple loggers is beneficial for software engineers.
Full-Stack Developer
A Full Stack Developer works on both the front-end and back-end components of a web application. This FastAPI course is beneficial for the back-end aspect of the role. The course teaches how to build robust APIs, manage databases, handle user authentication, and deploy applications to the cloud. The coverage of background tasks, handling file uploads, and using an async database library aligns with the duties of a full stack developer. Furthermore, the course's focus on testing and logging ensures the quality and reliability of the back-end services a Full Stack Developer builds.
Cloud Engineer
Cloud Engineers are responsible for designing, building, and managing cloud-based infrastructure and applications. This course on mastering Representational State Transfer APIs with FastAPI will provide valuable skills for a Cloud Engineer, particularly regarding application deployment and management. The course covers how to deploy FastAPI apps using services like Render, as well as application management, error handling with Sentry, and Continuous Integration/Continuous Delivery with GitHub Actions. Understanding how to build and deploy APIs using FastAPI helps Cloud Engineers optimize cloud resources and application performance. The course is useful for learning deployment for those who wish to become cloud engineers.
Application Architect
Application Architects design the structure and components of software applications, including APIs. This course on mastering Representational State Transfer APIs with FastAPI will help an Application Architect understand the practical aspects of designing and implementing APIs. The course covers topics such as building an API with user authentication, email sending, and file uploads, as well as testing, logging, and deployment. The breadth of topics prepares an Application Architect to make informed decisions about API design and implementation strategies. Understanding the different types of data relationships and how to model them, including many-to-many relationships, may be helpful.
Technical Lead
Technical Leads oversee software development teams and provide technical guidance. This course on mastering Representational State Transfer APIs with FastAPI may be useful because it provides a comprehensive overview of API development, testing, and deployment. The course's coverage of topics such as user authentication, database modeling, and continuous integration/continuous delivery enables a Technical Lead to make informed decisions and guide their team effectively. Knowledge of background tasks and handling file uploads, as covered in the course, will enable them to advise on performance and scalability. A technical lead should consider the benefits of this course.
DevOps Engineer
DevOps Engineers automate and streamline the software development lifecycle, including building, testing, and deployment. This course on mastering Representational State Transfer APIs with FastAPI is relevant to a DevOps Engineer because it covers API deployment, testing, and continuous integration/continuous delivery. The course explains how to deploy FastAPI apps using Render and how to set up Continuous Integration/Continuous Delivery pipelines with GitHub Actions. The knowledge about logging helps DevOps Engineers monitor and troubleshoot applications in production. Those who wish to become DevOps engineers may find this course to be useful.
Data Engineer
Data Engineers build and maintain the infrastructure for data storage and processing. This course on mastering Representational State Transfer APIs with FastAPI may be useful for a Data Engineer who needs to build APIs to access and manage data. The course will provide skills in API design and development, user authentication, and database interaction. The course's coverage of async databases and data validation with Pydantic are also applicable to data engineering tasks. The knowledge of using encode/databases as a database connectivity library is crucial.
Solutions Architect
Solutions Architects design and implement comprehensive technology solutions, often involving APIs and integrations. This course on mastering Representational State Transfer APIs with FastAPI is helpful for Solutions Architects, as it provides hands-on experience with building and deploying APIs. The course covers essential aspects, including user authentication, database modeling, background tasks, and deployment strategies. A Solutions Architect can leverage this knowledge to design and implement more effective and scalable solutions. This course may be helpful for those who wish to become solutions architects.
Database Administrator
Database Administrators manage and maintain databases, ensuring their performance, security, and availability. This course on mastering Representational State Transfer APIs with FastAPI may be useful for Database Administrators who need to understand how applications interact with databases. The course covers async database setup, database connection with lifespan events, and modeling data relationships (including many-to-many). The knowledge of Pydantic for data validation and encode/databases as a database connectivity library can assist database administrators. A database administrator should consider the benefits of this course.
System Administrator
System Administrators are responsible for managing and maintaining computer systems and servers. System administrators may find this course helpful because it covers application deployment and management, including error handling and logging. While not a primary focus, the skills learned in this course can help a System Administrator better understand and manage applications running on their systems. In particular, the course's coverage of using Sentry for error handling and the logging module helps System Administrators monitor and troubleshoot applications. Those who wish to become system administrators may find this course helpful.
Security Engineer
Security Engineers are responsible for protecting computer systems and networks from security threats. This course may be useful for Security Engineers because it covers user authentication with password hashing and bearer tokens, which are important security considerations when building APIs. Understanding how to implement secure authentication mechanisms can help a Security Engineer better protect applications and data. The knowledge of Logtail for Cloud Logging in FastAPI and enabling Logtail in only in production is also useful. A security engineer may find this course to be helpful.
Data Scientist
Data Scientists analyze data to extract insights and build predictive models. This course, while not directly related to data science, may be useful for Data Scientists who need to build APIs to expose their models or access data. The course covers API design and development, user authentication, and database interaction, which are all valuable skills for building data-driven applications. The course may be useful for adding skills to the data science toolbelt. A data scientist should consider the benefits of this course.
Technical Project Manager
Technical Project Managers oversee software development projects and ensure they are completed on time and within budget. While not directly a development role, the high level knowledge of this course on mastering Representational State Transfer APIs with FastAPI will help them understand the technologies and processes involved in API development. The course covers topics such as user authentication, database modeling, testing, and deployment, which can enable a Technical Project Manager to better manage and coordinate API development projects, leading the team towards success. A technical project manager may find this course to be helpful.

Reading list

We've selected two books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Mastering REST APIs with FastAPI.
Provides a comprehensive guide to SQLAlchemy, a powerful Python SQL toolkit and Object Relational Mapper (ORM). Since the course uses encode/databases, understanding SQLAlchemy can provide a deeper understanding of the underlying database interactions. It's particularly helpful for modeling complex data relationships and optimizing database queries. This book is more valuable as additional reading than it is as a current reference.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser