Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Independent

Test-Driven Development with FastAPI and Docker

via Independent

Overview

Google, IBM & Meta Certificates – 40% Off
One plan covers every Professional Certificate on Coursera.
Unlock All Certificates
Learn how to build, test, and deploy a text summarization microservice with Python, FastAPI, and Docker!

In this course, you'll learn how to build, test, and deploy a text summarization service with Python, FastAPI, and Docker. The service itself will be exposed via a RESTful API and deployed to Heroku with Docker.

Syllabus

In this first part, you'll learn how to develop an async RESTful API with Python, FastAPI, and Postgres. You'll containerize FastAPI and Postgres to run inside Docker containers and configure pytest in order to practice Test-Driven Development (TDD).Learning Objectives
  1. Develop an asynchronous RESTful API with Python and FastAPI
  2. Practice Test-Driven Development
  3. Test a FastAPI app with pytest
  4. Interact with a Postgres database asynchronously
  5. Containerize FastAPI and Postgres inside a Docker container
  6. Run unit and integration tests with code coverage
  7. Check your code for any code quality issues via a linter
In the second part, you'll start by deploying FastAPI, Gunicorn, Uvicorn, and Postgres to Heroku with Docker. You'll then continue to build out the RESTful API as you write unit and integration tests. Finally, we'll develop a text summarization service to produce article summaries from a given URL.Learning Objectives
  1. Configure GitHub Actions for continuous integration and deployment
  2. Use GitHub Packages to store Docker Images
  3. Speed up a Docker-based CI build with Docker Cache
  4. Deploy FastAPI, Uvicorn, and Postgres to Heroku with Docker
  5. Parameterize test functions and mock functionality in tests with pytest
  6. Run tests in parallel with pytest-xdist
  7. Document a RESTful API with Swagger/OpenAPI
  8. Run a background process outside the request/response flow

Taught by

Michael Herman

Reviews

Start your review of Test-Driven Development with FastAPI and Docker

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.