Examining the Importance of Streaming
00:00 Let’s see why streaming is important. If you try to download a file that’s larger than your available RAM using the standard method, your script will run out of memory and crash.
00:11 Streaming allows you to keep the connection open and download the file piece by piece. This isn’t only more memory-efficient, but it also allows you to start processing or saving data immediately as it arrives, and it enables you to show a download progress bar to the user.
00:28
The requests library makes streaming quite accessible, but it requires a small change to how you make your initial call. Let’s see how you can stream a file download using the requests library.
Become a Member to join the conversation.
