FastAPI · Intermediate · Self-paced
Building Production-Ready APIs with FastAPI
Learn to build APIs you can explain, test and improve. Start with a small Equipment Rental API, then add a database, async I/O, permissions and the habits that make changes dependable.
- Learning path
- 9 modules · 26 lessons
- Active learning
- About 20 hours
- Practice
- Equipment Rental + Event Booking APIs
Course in preparation. Enrolment, lessons and downloads are not open yet. A release date has not been announced.
Is this course for you?
For Python learners and developers who can write functions and classes and want to move beyond a first API tutorial. The course starts with synchronous requests before introducing async database work.
Lesson times include reading and inspecting examples, running the Equipment demonstrations and tests, and trying local Equipment practice. They assume the stated prerequisites and working Python/Docker installations. These are provisional planning estimates; learner completion times have not been measured. Installation troubleshooting, passive build waits and reviewer waiting add time.
Optional Event Booking capstone: about 23 hours additional. Optional Event Booking capstone work is additional. Its estimate includes incremental implementation, verification, reflection and the final evidence bundle across the nine milestones. It does not include certification review or waiting.
What you will learn to do
- Build validated FastAPI endpoints with clear request, response and error contracts.
- Store related data in PostgreSQL and evolve the schema with Alembic migrations.
- Test transactions, capacity rules and pagination so changes preserve the behavior callers expect.
- Move database work to async while keeping sessions and concurrent tasks independent.
- Apply identity, roles and ownership rules, and handle unreliable provider calls.
- Trace failures, repair a bug with a regression test and rehearse repeatable API delivery.
Two projects, one learning path
Follow the Equipment Rental API demonstrations as each feature is introduced and tested. You will see the application grow from a first endpoint to persistent rental operations, permissions, diagnostics and delivery.
Apply the same ideas to your own Event Booking API. The capstone grows alongside the lessons, from event contracts and registration capacity to an organizer check-in feature.
Capstone practice and submissions are optional for learning and lesson progress. A future certification route would require accepted capstone evidence and review. Certification is not currently available.
Explore the nine Event Booking milestones
- Runnable Event API and safe configuration (v0.1.1) · About 1 hr additional capstone work
- Validated event contracts (v0.2.1) · About 1 hr 15 min additional capstone work
- Event and Registration structure (v0.3.2) · About 2 hr additional capstone work
- Persistent booking behavior (v0.4.3) · About 3 hr 30 min additional capstone work
- Equivalent async Event API (v0.5.2) · About 2 hr 30 min additional capstone work
- Attendee, organizer and admin decisions (v0.6.3) · About 3 hr 30 min additional capstone work
- Bounded confirmation preview (v0.7.2) · About 3 hr 30 min additional capstone work
- Trace, signals and cursor repair (v0.8.2) · About 2 hr 15 min additional capstone work
- Organizer check-in and review bundle (v0.9.1) · About 3 hr additional capstone work
Before you begin
You should already be comfortable with these basics:
- Write Python functions and classes.
- Use basic terminal commands and Python virtual environments.
- Understand basic HTTP requests and responses.
Nine modules, 26 lessons
Begin with synchronous requests and a working database path. Move to async when you understand the waiting it addresses, then bring identity, provider boundaries and delivery together.
Open a module to see its lessons.
Module 1 Build a synchronous API
Begin with a request you can explain and a response you can test. Then make that small application reproducible through configuration, health checks and declared dependencies.
About 1 hr 15 min active learning. Optional capstone: about 1 hr additional.
- Build your first synchronous HTTP endpoint · About 35 min active learning
- Configure and run a reproducible API · About 40 min active learning
Module 2 Define API contracts and routes
Now that the application runs, decide what callers may send and what they can expect back. Shape validated resources, organize routes and make failure responses dependable.
About 1 hr 10 min active learning. Optional capstone: about 1 hr 15 min additional.
- Validate API requests and responses · About 35 min active learning
- Organize routes and return consistent errors · About 35 min active learning
Module 3 Connect PostgreSQL and establish the schema
The in-memory service loses its state on restart. Add synchronous PostgreSQL, give sessions clear ownership and record the schema through an explicit Alembic migration.
About 2 hr 20 min active learning. Optional capstone: about 2 hr additional.
- Give each request its own PostgreSQL session · About 50 min active learning
- Model relationships and enforce database constraints · About 45 min active learning
- Create and verify an Alembic migration · About 45 min active learning
Module 4 Persist operations and evolve existing data
Persistence adds new promises: a successful response follows a committed change, pages have stable boundaries, capacity decisions survive contention and migrations preserve existing rows.
About 3 hr 10 min active learning. Optional capstone: about 3 hr 30 min additional.
- Persist CRUD changes with explicit transactions · About 45 min active learning
- Load related data and paginate without repeats · About 40 min active learning
- Protect capacity decisions in one transaction · About 1 hr active learning
- Backfill existing data in bounded batches · About 45 min active learning
Module 5 Convert database I/O to async
With synchronous persistence understood, explore what happens while work waits. Convert database I/O to async, retain the HTTP behavior and give concurrent tasks independent sessions.
About 2 hr active learning. Optional capstone: about 2 hr 30 min additional.
- See how awaited I/O changes scheduling · About 30 min active learning
- Convert database I/O to AsyncSession · About 50 min active learning
- Give concurrent tasks separate sessions · About 40 min active learning
Module 6 Validate identity and enforce permissions
Identify a local synthetic user, validate a JWT and decide what that current user may do. Carry the same role and ownership decisions into an alternative policy representation.
About 3 hr active learning. Optional capstone: about 3 hr 30 min additional.
- Create local users and offload password hashing · About 40 min active learning
- Validate JWTs and resolve the current user · About 55 min active learning
- Enforce permissions with roles and ownership · About 45 min active learning
- Preserve permission decisions with Casbin · About 40 min active learning
Module 7 Bound provider calls and background work
External work can be malformed, slow or unavailable. Validate provider responses, bound retries and deadlines, then admit only the background work the process can handle.
About 2 hr 50 min active learning. Optional capstone: about 3 hr 30 min additional.
- Validate asynchronous provider responses · About 45 min active learning
- Bound retries and recover from provider failures · About 1 hr 5 min active learning
- Bound background work and shut down cleanly · About 1 hr active learning
Module 8 Trace requests and diagnose failures
Follow requests across their work without exposing secrets. Distinguish operational signals, then investigate a deliberate pagination incident with a failing regression and a precise repair.
About 2 hr 15 min active learning. Optional capstone: about 2 hr 15 min additional.
- Trace requests with redacted structured logs · About 45 min active learning
- Distinguish liveness, readiness and metrics · About 40 min active learning
- Repair a repeated-page bug with a regression · About 50 min active learning
Module 9 Rehearse delivery and integrate a final feature
Rehearse the application from declared inputs in a fresh environment. Finish with a complete domain change whose migration, permissions, transaction and evidence another person can review.
About 1 hr 55 min active learning. Optional capstone: about 3 hr additional.
- Rehearse builds, migrations and API startup · About 55 min active learning
- Integrate a final feature with reviewable evidence · About 1 hr active learning
Reading, practice and saved progress
This landing page and curriculum preview are available without an account. Course lessons and packages are still being prepared for release.
Guest reading will be available for lessons released for public access. Assessments and saved progress require sign-in and enrolment, so your learning stays with the course version you joined.
The capstone will not block access to lessons or ordinary progress. Certification is a separate future path and is not available now.
Preview the curriculumSelf-paced lessons and local practice. This page describes the current course plan.