Shuts down the PC when a download limit is reached. Script written to limit my data usage while downloading through my daily limited internet.
On windows, you can invoke it from Admin Command Prompt or PowerShell.
On Linux and Mac, use sudo before the command.
First argument is data limit in MB and the second argument is time period of update in seconds.
The below will run the program with 1024 MB of limit and program will monitor usage after every 5 seconds.
python download_limiter.py 1024 5