Python FastAPI Tutorial (Part 17): Testing the API - Pytest, Fixtures, and Mocking External Services

by Corey Schafer · published 2026-04-17

Total watch time

1h 22m

at speed · exactly 1 hour, 22 minutes, 26 seconds at 1×

1h 22m 26s
1.25×1h 5m 57s
1.5×54m 57s
1.75×47m 6s
41m 13s
Compare Open on YouTube JSON

Embed a badge

Show the length in a README or course description — it links back here and updates itself

Length: 1h 22m 26s

Markdown
[![Length: 1h 22m 26s](https://playlistduration.com/badge/video/SO7m7nod0ts.svg)](https://playlistduration.com/video/SO7m7nod0ts)
HTML
<a href="https://playlistduration.com/video/SO7m7nod0ts"><img src="https://playlistduration.com/badge/video/SO7m7nod0ts.svg" alt="Length: 1h 22m 26s" width="135" height="20"></a>

Add ?speed=1.5 to the image URL for the time at that speed, ?label=Course to change the left text, or ?style=flat-square for square corners.

Want the numbers themselves? GET https://playlistduration.com/api/v1/video/SO7m7nod0ts returns them as JSON — free, no key. API docs →

Data from the YouTube Data API as of 2026-09-22 (cached).