I would like to download a Kaggle Dataset. I generated the Kaggle.json file, but unfortunately I don't have a drive (I can't use it). Is there any option to generate the username and token in directly in the code? For example I tried this
x = '{"username":"<USERNAME>","key":"<TOKEN>"}'
y = json.loads(x)
api = KaggleApi(y)
api.authenticate()
files = api.competition_download_files("two-sigma-financial-news")
The error is
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-6-237de0539a08> in <module>()
1 api = KaggleApi(y)
----> 2 api.authenticate()
3 files = api.competition_download_files("two-sigma-financial-news")
/usr/local/lib/python3.6/dist-packages/kaggle/api/kaggle_api_extended.py in authenticate(self)
164 raise IOError('Could not find {}. Make sure it\'s located in'
165 ' {}. Or use the environment method.'.format(
--> 166 self.config_file, self.config_dir))
167
168 # Step 3: load into configuration!
OSError: Could not find kaggle.json. Make sure it's located in /root/.kaggle. Or use the environment method.
But it isn't right. May someone could help me plase? I'm using Colab, but I don't want to store the JSON file in my Google Drive. Is there any option to generate the JSON file directly?
Thanks in advance.