You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/README.md
+4-22Lines changed: 4 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,30 +25,12 @@ IMPORTANT: We do not offer Python 2 support. Please ensure that you are using P
25
25
26
26
## API credentials
27
27
28
-
To use the Kaggle API, sign up for a Kaggle account at https://www.kaggle.com. Then go to the 'Account' tab of your user profile (`https://www.kaggle.com/<username>/account`) and select 'Create API Token'. This will trigger the download of `kaggle.json`, a file containing your API credentials.
29
-
Place this file in the location appropriate for your operating system:
30
-
* Linux: `$XDG_CONFIG_HOME/kaggle/kaggle.json` (defaults to `~/.config/kaggle/kaggle.json`). The path `~/.kaggle/kaggle.json` which was used by older versions of the tool is also still supported.
31
-
* Windows: `C:\Users\<Windows-username>\.kaggle\kaggle.json` - you can check the exact location, sans drive, with `echo %HOMEPATH%`.
32
-
* Other: `~/.kaggle/kaggle.json`
28
+
To use the Kaggle API, sign up for a Kaggle account at https://www.kaggle.com. Then go to the 'Account' tab of your user profile (`https://www.kaggle.com/<username>/account`) and select 'Generate New Token'. Copy the generated token and save it in an environment
29
+
variable named `KAGGLE_API_TOKEN` or place the value in a file named `~/.kaggle/access_token`. (The file may optionally have a `.txt` extension.)
33
30
34
-
You can define a shell environment variable `KAGGLE_CONFIG_DIR` to change this location to `$KAGGLE_CONFIG_DIR/kaggle.json` (on Windows it will be `%KAGGLE_CONFIG_DIR%\kaggle.json`).
35
-
36
-
37
-
For your security, ensure that other users of your computer do not have read access to your credentials. On Unix-based systems you can do this with the following command:
38
-
39
-
`chmod 600 ~/.config/kaggle/kaggle.json`
40
-
41
-
You can also choose to export your Kaggle username and token to the environment:
42
-
43
-
```bash
44
-
export KAGGLE_USERNAME=datadinosaur
45
-
export KAGGLE_KEY=xxxxxxxxxxxxxx
46
-
```
47
-
In addition, you can export any other configuration value that normally would be in
48
-
the `kaggle.json` in the format 'KAGGLE_<VARIABLE>' (note uppercase).
49
-
For example, if the file had the variable "proxy" you would export `KAGGLE_PROXY`
50
-
and it would be discovered by the client.
31
+
Note: If you already have a `~/.kaggle/kaggle.json` file with legacy API credentials, it will continue to work.
51
32
33
+
What's noteworthy is that now when generating new tokens you do not have to update existing token usage. The old tokens will continue to work; previously they expired when a new token was generated.
Copy file name to clipboardExpand all lines: documentation/intro.md
+4-21Lines changed: 4 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,29 +26,12 @@ IMPORTANT: We do not offer Python 2 support. Please ensure that you are using P
26
26
27
27
### API credentials
28
28
29
-
To use the Kaggle API, sign up for a Kaggle account at https://www.kaggle.com. Then go to the 'Account' tab of your user profile (`https://www.kaggle.com/<username>/account`) and select 'Create API Token'. This will trigger the download of `kaggle.json`, a file containing your API credentials.
30
-
Place this file in the location appropriate for your operating system:
31
-
* Linux: `$XDG_CONFIG_HOME/kaggle/kaggle.json` (defaults to `~/.config/kaggle/kaggle.json`). The path `~/.kaggle/kaggle.json` which was used by older versions of the tool is also still supported.
32
-
* Windows: `C:\Users\<Windows-username>\.kaggle\kaggle.json` - you can check the exact location, sans drive, with `echo %HOMEPATH%`.
33
-
* Other: `~/.kaggle/kaggle.json`
29
+
To use the Kaggle API, sign up for a Kaggle account at https://www.kaggle.com. Then go to the 'Account' tab of your user profile (`https://www.kaggle.com/<username>/account`) and select 'Generate New Token'. Copy the generated token and save it in an environment
30
+
variable named `KAGGLE_API_TOKEN` or place the value in a file named `~/.kaggle/access_token`. (The file may optionally have a `.txt` extension.)
34
31
35
-
You can define a shell environment variable `KAGGLE_CONFIG_DIR` to change this location to `$KAGGLE_CONFIG_DIR/kaggle.json`(on Windows it will be `%KAGGLE_CONFIG_DIR%\kaggle.json`).
32
+
Note: If you already have a `~/.kaggle/kaggle.json`file with legacy API credentials, it will continue to work.
36
33
37
-
38
-
For your security, ensure that other users of your computer do not have read access to your credentials. On Unix-based systems you can do this with the following command:
39
-
40
-
`chmod 600 ~/.config/kaggle/kaggle.json`
41
-
42
-
You can also choose to export your Kaggle username and token to the environment:
43
-
44
-
```bash
45
-
export KAGGLE_USERNAME=datadinosaur
46
-
export KAGGLE_KEY=xxxxxxxxxxxxxx
47
-
```
48
-
In addition, you can export any other configuration value that normally would be in
49
-
the `kaggle.json` in the format 'KAGGLE_<VARIABLE>' (note uppercase).
50
-
For example, if the file had the variable "proxy" you would export `KAGGLE_PROXY`
51
-
and it would be discovered by the client.
34
+
What's noteworthy is that now when generating new tokens you do not have to update existing token usage. The old tokens will continue to work; previously they expired when a new token was generated.
0 commit comments