kaggle.jsonto your computer. You’ll use this file in Colab to access Kaggle datasets and competitions.
kaggle.jsonfile using the following snippet in a code cell:
from google.colab import files files.upload()
!pip install -q kaggle
~/.kaggle, which is where the API client expects your token to be located:
!mkdir -p ~/.kaggle !cp kaggle.json ~/.kaggle/
!kaggle datasets list.
!kaggle datasets download -d stackoverflow/stack-overflow-2018-developer-survey
Here’s a complete example notebook of the Colab portion of this process: https://colab.research.google.com/drive/1DofKEdQYaXmDWBzuResXWWvxhLgDeVyl
This example shows uploading the
kaggle.json file, the Kaggle API client, and using the Kaggle client to download a dataset.