I want to write a python script that downloads a public dataset from Kaggle.com.
The Kaggle API is written in python, but almost all of the documentation
You can check the implementation of the Kaggle API
But if you are lazy you can just install kaggle on your server
pip install kaggle.
And to download a whole competition you may call this from python.
import os
os.system('kaggle competitions download -c "dogs-vs-cats-redux-kernels-edition"')
Further, check the docs