Skip to content

Commit 3f8e54c

Browse files
authored
Prepare for release 1.8.0 (#863)
1 parent eb5db9d commit 3f8e54c

File tree

5 files changed

+24
-46
lines changed

5 files changed

+24
-46
lines changed

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
11
Changelog
22
====
33

4-
### 1.7.5.0.dev0
4+
### 1.8.0
5+
6+
* Fix resumable download error (#865)
7+
* Fix dataset version spec (#862)
8+
* Add machine_shape to the metadata of kaggle kernels pull (#856)
9+
* Add pagination options to models
10+
* Add pagination options for submissions (#832)
11+
* Add pagination options to list commands (#815)
12+
* Add canonical aliases for push/pull (#787)
13+
* Add parquet as a filter option (#786)
14+
* Add variations as alt for instances (#784)
15+
* Enable (and rename) synonyms i and v (#782)
16+
17+
### 1.7.5.0 (not released)
518

619
* Require Python 3.11.
720
* Add KernelExecutionType (#775)

docs/README.md

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,12 @@ IMPORTANT: We do not offer Python 2 support. Please ensure that you are using P
2525

2626
## API credentials
2727

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.)
3330

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.
5132

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.
5234

5335
## Commands
5436

documentation/intro.md

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,12 @@ IMPORTANT: We do not offer Python 2 support. Please ensure that you are using P
2626

2727
### API credentials
2828

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.)
3431

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.
3633

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.
5235

5336
## Tutorials
5437

src/kaggle/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import os
44
from kaggle.api.kaggle_api_extended import KaggleApi
55

6-
__version__ = "1.7.5.0.dev1"
6+
__version__ = "1.8.0"
77

88
enable_oauth = os.environ.get("KAGGLE_ENABLE_OAUTH") in ("1", "true", "yes")
99
api = KaggleApi(enable_oauth=enable_oauth)

src/kagglesdk/kaggle_http_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def _init_session(self):
147147
return self._session
148148

149149
self._session = requests.Session()
150-
self._session.headers.update({"User-Agent": "kaggle-api/v1.7.0", "Content-Type": "application/json"}) # Was: V2
150+
self._session.headers.update({"User-Agent": "kaggle-api/v1.8.0", "Content-Type": "application/json"}) # Was: V2
151151

152152
iap_token = self._get_iap_token_if_required()
153153
if iap_token is not None:

0 commit comments

Comments
 (0)