import time import requests data = b"x" * 10_000_000 # 10 MB start = time.time() response = requests.post("https://httpbin.org/post", data=data) end = time.time() duration = end - start speed_mbps = (len(data) * 8) / (duration * 1_000_000) print(f"Upload time: {duration:.2f} seconds") print(f"Estimated outbound upload speed: {speed_mbps:.2f} Mbps")