In this post, we’ll check out file transfer in Python 3 with file size verification check.
In many Python scripts you’ll come across the need for sending and receiving files over the network, so I decided to make this tutorial for a simple yet stable set of scripts to implement whenever needed.
We’ll only use standard Python libraries included with a default installation: socket, time, os and sys.
One nice little detail we’ll implement is file size verification, so that the receiving party can be sure they received the file with the exact amount of bytes the sender intended.
Let’s check it out!
Reading time: 2 min