kaggle 1.8.3__tar.gz → 1.8.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {kaggle-1.8.3 → kaggle-1.8.4}/CHANGELOG.md +9 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/PKG-INFO +65 -74
- kaggle-1.8.4/README.md +111 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/SECURITY.md +1 -1
- kaggle-1.8.4/docs/README.md +66 -0
- {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/competitions.md +10 -2
- {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/conf.py +1 -1
- {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/datasets.md +1 -1
- {kaggle-1.8.3 → kaggle-1.8.4}/docs/datasets_metadata.md +2 -2
- {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/index.rst +2 -2
- {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/kernels.md +25 -1
- {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/model_instances.md +8 -7
- {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/model_instances_versions.md +8 -8
- {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/models.md +1 -1
- {kaggle-1.8.3 → kaggle-1.8.4}/docs/models_metadata.md +15 -21
- {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/tutorials.md +12 -7
- {kaggle-1.8.3 → kaggle-1.8.4}/integration_tests/test_models.py +0 -2
- {kaggle-1.8.3 → kaggle-1.8.4}/pyproject.toml +34 -28
- {kaggle-1.8.3 → kaggle-1.8.4}/src/kaggle/__init__.py +1 -1
- {kaggle-1.8.3 → kaggle-1.8.4}/src/kaggle/api/kaggle_api_extended.py +183 -74
- {kaggle-1.8.3 → kaggle-1.8.4}/src/kaggle/cli.py +36 -28
- kaggle-1.8.4/src/kaggle/models/__init__.py +0 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/src/kaggle/models/upload_file.py +4 -4
- kaggle-1.8.4/tests/__init__.py +0 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/tests/test_commands.sh +1 -1
- {kaggle-1.8.3 → kaggle-1.8.4}/tests/unit_tests.py +2 -2
- {kaggle-1.8.3 → kaggle-1.8.4}/tools/cicd/integration-tests.yaml +1 -1
- {kaggle-1.8.3 → kaggle-1.8.4}/tools/releases/requirements.txt +3 -3
- kaggle-1.8.3/README.md +0 -115
- kaggle-1.8.3/docs/ApiBlobType.md +0 -9
- kaggle-1.8.3/docs/Collaborator.md +0 -11
- kaggle-1.8.3/docs/CreateInboxFileRequest.md +0 -11
- kaggle-1.8.3/docs/DatasetColumn.md +0 -14
- kaggle-1.8.3/docs/DatasetNewRequest.md +0 -19
- kaggle-1.8.3/docs/DatasetNewVersionRequest.md +0 -16
- kaggle-1.8.3/docs/DatasetUpdateSettingsRequest.md +0 -17
- kaggle-1.8.3/docs/Error.md +0 -11
- kaggle-1.8.3/docs/KaggleApi.md +0 -2398
- kaggle-1.8.3/docs/KernelPushRequest.md +0 -25
- kaggle-1.8.3/docs/License.md +0 -10
- kaggle-1.8.3/docs/ModelInstanceNewVersionRequest.md +0 -11
- kaggle-1.8.3/docs/ModelInstanceUpdateRequest.md +0 -18
- kaggle-1.8.3/docs/ModelNewInstanceRequest.md +0 -20
- kaggle-1.8.3/docs/ModelNewRequest.md +0 -17
- kaggle-1.8.3/docs/ModelUpdateRequest.md +0 -16
- kaggle-1.8.3/docs/README.md +0 -1000
- kaggle-1.8.3/docs/Result.md +0 -9
- kaggle-1.8.3/docs/StartBlobUploadRequest.md +0 -14
- kaggle-1.8.3/docs/StartBlobUploadResponse.md +0 -11
- kaggle-1.8.3/docs/UploadFile.md +0 -12
- kaggle-1.8.3/docs/conf.py +0 -65
- kaggle-1.8.3/docs/index.rst +0 -5
- kaggle-1.8.3/docs/model_card.md +0 -67
- kaggle-1.8.3/docs/modelinstance_usage.md +0 -27
- kaggle-1.8.3/documentation/intro.md +0 -70
- kaggle-1.8.3/src/kaggle/models/api_blob_type.py +0 -4
- kaggle-1.8.3/src/kaggle/models/dataset_column.py +0 -228
- kaggle-1.8.3/src/kaggle/models/dataset_new_request.py +0 -443
- kaggle-1.8.3/src/kaggle/models/dataset_new_version_request.py +0 -319
- kaggle-1.8.3/src/kaggle/models/dataset_update_settings_request.py +0 -344
- kaggle-1.8.3/src/kaggle/models/kernel_push_request.py +0 -608
- kaggle-1.8.3/src/kaggle/models/model_instance_new_version_request.py +0 -145
- kaggle-1.8.3/src/kaggle/models/model_instance_update_request.py +0 -451
- kaggle-1.8.3/src/kaggle/models/model_new_instance_request.py +0 -552
- kaggle-1.8.3/src/kaggle/models/model_new_request.py +0 -329
- kaggle-1.8.3/src/kaggle/models/model_update_request.py +0 -300
- kaggle-1.8.3/src/kaggle/models/start_blob_upload_request.py +0 -240
- kaggle-1.8.3/src/kaggle/models/start_blob_upload_response.py +0 -142
- kaggle-1.8.3/tools/GeneratePythonLibrary.sh +0 -209
- {kaggle-1.8.3 → kaggle-1.8.4}/.gcloudignore +0 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/.github/workflows/no-response.yaml +0 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/.gitignore +0 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/CONTRIBUTING.md +0 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/GEMINI.md +0 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/LICENSE.txt +0 -0
- {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/Makefile +0 -0
- {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/configuration.md +0 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/docs/kernels_metadata.md +0 -0
- {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/make.bat +0 -0
- {kaggle-1.8.3/src/kaggle/api → kaggle-1.8.4/integration_tests}/__init__.py +0 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/src/kaggle/LICENSE +0 -0
- {kaggle-1.8.3/src/kaggle/models → kaggle-1.8.4/src/kaggle/api}/__init__.py +0 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/src/kaggle/api/kaggle_api.py +0 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/src/kaggle/models/kaggle_models_extended.py +0 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/src/kaggle/test/test_authenticate.py +0 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/tests/dataset/data.csv +0 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/tests/kernel/testing-x.ipynb +0 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/tests/model/instance/data.csv +0 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/tests/model/instance/version/metadata.json +0 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/tests/sample_submission.csv +0 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/tools/releases/Dockerfile +0 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/tools/releases/cloudbuild.yaml +0 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/tools/releases/requirements.in +0 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/tools/use-localhost.sh +0 -0
- {kaggle-1.8.3 → kaggle-1.8.4}/tools/use-prod.sh +0 -0
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
====
|
|
3
3
|
|
|
4
|
+
### 1.8.4
|
|
5
|
+
|
|
6
|
+
* Rename `kaggle-api` to `kaggle-cli`
|
|
7
|
+
* Allow auth to happen multiple times (#922)
|
|
8
|
+
* Add --acc to set accelerator for: kaggle kernels push ... (#907)
|
|
9
|
+
* Add automatic retry and resume to download_file (#905) Thanks katoue!
|
|
10
|
+
* Restore model validation check (#902)
|
|
11
|
+
* Add file pattern matching in output download (#901) Thanks piotr-ginal!
|
|
12
|
+
|
|
4
13
|
### 1.8.3
|
|
5
14
|
|
|
6
15
|
* Add packaging dep (#883)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kaggle
|
|
3
|
-
Version: 1.8.
|
|
3
|
+
Version: 1.8.4
|
|
4
4
|
Summary: Access Kaggle resources anywhere
|
|
5
|
-
Project-URL: Homepage, https://github.com/Kaggle/kaggle-
|
|
6
|
-
Project-URL: Issues, https://github.com/Kaggle/kaggle-
|
|
5
|
+
Project-URL: Homepage, https://github.com/Kaggle/kaggle-cli
|
|
6
|
+
Project-URL: Issues, https://github.com/Kaggle/kaggle-cli/issues
|
|
7
7
|
Author-email: Kaggle <support@kaggle.com>
|
|
8
8
|
License: Apache License
|
|
9
9
|
Version 2.0, January 2004
|
|
@@ -212,46 +212,57 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
212
212
|
Classifier: Operating System :: OS Independent
|
|
213
213
|
Classifier: Programming Language :: Python :: 3
|
|
214
214
|
Requires-Python: >=3.11
|
|
215
|
-
Requires-Dist: black>=24.10.0
|
|
216
215
|
Requires-Dist: bleach
|
|
217
|
-
Requires-Dist: kagglesdk<1.0,>=0.1.
|
|
218
|
-
Requires-Dist: mypy>=1.15.0
|
|
216
|
+
Requires-Dist: kagglesdk<1.0,>=0.1.15
|
|
219
217
|
Requires-Dist: packaging
|
|
220
218
|
Requires-Dist: protobuf
|
|
221
219
|
Requires-Dist: python-dateutil
|
|
222
220
|
Requires-Dist: python-slugify
|
|
223
221
|
Requires-Dist: requests
|
|
224
|
-
Requires-Dist: six>=1.10
|
|
225
222
|
Requires-Dist: tqdm
|
|
226
|
-
Requires-Dist: types-requests
|
|
227
|
-
Requires-Dist: types-tqdm
|
|
228
223
|
Requires-Dist: urllib3>=1.15.1
|
|
229
224
|
Description-Content-Type: text/markdown
|
|
230
225
|
|
|
231
|
-
# Kaggle
|
|
226
|
+
# Kaggle CLI
|
|
232
227
|
|
|
233
|
-
|
|
228
|
+
The official CLI to interact with [Kaggle](https://www.kaggle.com).
|
|
229
|
+
|
|
230
|
+
---
|
|
234
231
|
|
|
235
232
|
[User documentation](docs/README.md)
|
|
236
233
|
|
|
237
|
-
|
|
234
|
+
---
|
|
238
235
|
|
|
239
|
-
|
|
236
|
+
## Key Features
|
|
240
237
|
|
|
241
|
-
|
|
238
|
+
Some of the key features are:
|
|
239
|
+
|
|
240
|
+
* List competitions, download competition data, submit to a competition.
|
|
241
|
+
* List, create, update, download or delete datasets.
|
|
242
|
+
* List, create, update, download or delete models & model variations.
|
|
243
|
+
* List, update & run, download code & output or delete kernels (notebooks).
|
|
244
|
+
|
|
245
|
+
## Installation
|
|
246
|
+
|
|
247
|
+
Install the `kaggle` package with [pip](https://pypi.org/project/pip/):
|
|
242
248
|
|
|
243
249
|
```sh
|
|
244
250
|
pip install kaggle
|
|
245
251
|
```
|
|
246
252
|
|
|
247
|
-
|
|
253
|
+
Additional installation instructions can be found [here](docs/README.md#installation).
|
|
248
254
|
|
|
249
|
-
|
|
255
|
+
## Quick start
|
|
250
256
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
257
|
+
Explore the available commands by running:
|
|
258
|
+
|
|
259
|
+
```sh
|
|
260
|
+
kaggle --help
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
See the [User documentation](docs/README.md) for more examples & tutorials.
|
|
264
|
+
|
|
265
|
+
## Development
|
|
255
266
|
|
|
256
267
|
### Prerequisites
|
|
257
268
|
|
|
@@ -259,87 +270,67 @@ We use [hatch](https://hatch.pypa.io) to manage this project.
|
|
|
259
270
|
|
|
260
271
|
Follow these [instructions](https://hatch.pypa.io/latest/install/) to install it.
|
|
261
272
|
|
|
262
|
-
|
|
263
|
-
try `sudo apt install pipx`. Then you should be able to proceed with `pipx install hatch`.
|
|
273
|
+
### Run `kaggle` from source
|
|
264
274
|
|
|
265
|
-
|
|
275
|
+
#### Option 1: Execute a one-liner of code from the command line
|
|
266
276
|
|
|
267
277
|
```sh
|
|
268
|
-
hatch run
|
|
278
|
+
hatch run kaggle datasets list
|
|
269
279
|
```
|
|
270
280
|
|
|
271
|
-
|
|
281
|
+
#### Option 2: Run many commands in a shell
|
|
272
282
|
|
|
273
283
|
```sh
|
|
274
|
-
hatch
|
|
284
|
+
hatch shell
|
|
285
|
+
|
|
286
|
+
# Inside the shell, you can run many commands
|
|
287
|
+
kaggle datasets list
|
|
288
|
+
kaggle competitions list
|
|
289
|
+
...
|
|
275
290
|
```
|
|
276
291
|
|
|
277
|
-
|
|
292
|
+
### Lint / Format
|
|
278
293
|
|
|
279
|
-
|
|
294
|
+
```sh
|
|
295
|
+
# Lint check
|
|
296
|
+
hatch run lint:style
|
|
297
|
+
hatch run lint:typing
|
|
298
|
+
hatch run lint:all # for both
|
|
280
299
|
|
|
281
|
-
|
|
300
|
+
# Format
|
|
301
|
+
hatch run lint:fmt
|
|
302
|
+
```
|
|
282
303
|
|
|
283
|
-
|
|
284
|
-
To run that version locally for testing, use hatch: `hatch run kaggle -v`. If you'd rather not
|
|
285
|
-
type `hatch run` every time, launch a new shell in the hatch environment: `hatch shell`.
|
|
304
|
+
### Tests
|
|
286
305
|
|
|
287
|
-
|
|
306
|
+
Note: These tests are not true unit tests and are calling the Kaggle web server.
|
|
288
307
|
|
|
289
308
|
```sh
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
```python
|
|
294
|
-
import kaggle
|
|
295
|
-
from kaggle.api.kaggle_api_extended import KaggleApi
|
|
296
|
-
api = KaggleApi()
|
|
297
|
-
api.authenticate()
|
|
298
|
-
api.model_list_cli()
|
|
299
|
-
|
|
300
|
-
Next Page Token = [...]
|
|
301
|
-
[...]
|
|
309
|
+
# Run against kaggle.com
|
|
310
|
+
hatch run test:prod
|
|
302
311
|
|
|
312
|
+
# Run against a local web server (Kaggle engineers only)
|
|
313
|
+
hatch run test:local
|
|
303
314
|
```
|
|
304
315
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
```sh
|
|
308
|
-
hatch run python -c "import kaggle; from kaggle.api.kaggle_api_extended import KaggleApi; api = KaggleApi(); api.authenticate(); api.model_list_cli()"
|
|
309
|
-
```
|
|
316
|
+
### Integration Tests
|
|
310
317
|
|
|
311
|
-
|
|
318
|
+
To run integration tests on your local machine, you need to set up your Kaggle credentials. You can do this by following the [authentication instructions](docs/README.md#authentication).
|
|
312
319
|
|
|
313
|
-
|
|
320
|
+
After setting up your credentials, you can run the integration tests as follows:
|
|
314
321
|
|
|
315
322
|
```sh
|
|
316
|
-
|
|
317
|
-
[...]
|
|
318
|
-
+ print('hello Kaggle CLI update')^M
|
|
319
|
-
models = self.model_list(sort_by, search, owner, page_size, page_token)
|
|
320
|
-
[...]
|
|
321
|
-
|
|
322
|
-
❯ hatch run compile
|
|
323
|
-
[...]
|
|
324
|
-
|
|
325
|
-
❯ hatch run python -c "import kaggle; from kaggle.api.kaggle_api_extended import KaggleApi; api = KaggleApi(); api.authenticate(); api.model_list_cli()"
|
|
326
|
-
hello Kaggle CLI update
|
|
327
|
-
Next Page Token = [...]
|
|
323
|
+
hatch run test:integration
|
|
328
324
|
```
|
|
329
325
|
|
|
330
|
-
|
|
326
|
+
## Changelog
|
|
331
327
|
|
|
332
|
-
|
|
333
|
-
- Using environment variables
|
|
334
|
-
- Using credentials file
|
|
328
|
+
See [CHANGELOG](CHANGELOG.md).
|
|
335
329
|
|
|
336
|
-
|
|
330
|
+
## Contributing
|
|
337
331
|
|
|
338
|
-
|
|
339
|
-
# Run all tests
|
|
340
|
-
hatch run integration-test
|
|
341
|
-
```
|
|
332
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
342
333
|
|
|
343
334
|
## License
|
|
344
335
|
|
|
345
|
-
The Kaggle
|
|
336
|
+
The Kaggle CLI is released under the [Apache 2.0 license](LICENSE.txt).
|
kaggle-1.8.4/README.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Kaggle CLI
|
|
2
|
+
|
|
3
|
+
The official CLI to interact with [Kaggle](https://www.kaggle.com).
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[User documentation](docs/README.md)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Key Features
|
|
12
|
+
|
|
13
|
+
Some of the key features are:
|
|
14
|
+
|
|
15
|
+
* List competitions, download competition data, submit to a competition.
|
|
16
|
+
* List, create, update, download or delete datasets.
|
|
17
|
+
* List, create, update, download or delete models & model variations.
|
|
18
|
+
* List, update & run, download code & output or delete kernels (notebooks).
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
Install the `kaggle` package with [pip](https://pypi.org/project/pip/):
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
pip install kaggle
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Additional installation instructions can be found [here](docs/README.md#installation).
|
|
29
|
+
|
|
30
|
+
## Quick start
|
|
31
|
+
|
|
32
|
+
Explore the available commands by running:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
kaggle --help
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
See the [User documentation](docs/README.md) for more examples & tutorials.
|
|
39
|
+
|
|
40
|
+
## Development
|
|
41
|
+
|
|
42
|
+
### Prerequisites
|
|
43
|
+
|
|
44
|
+
We use [hatch](https://hatch.pypa.io) to manage this project.
|
|
45
|
+
|
|
46
|
+
Follow these [instructions](https://hatch.pypa.io/latest/install/) to install it.
|
|
47
|
+
|
|
48
|
+
### Run `kaggle` from source
|
|
49
|
+
|
|
50
|
+
#### Option 1: Execute a one-liner of code from the command line
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
hatch run kaggle datasets list
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
#### Option 2: Run many commands in a shell
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
hatch shell
|
|
60
|
+
|
|
61
|
+
# Inside the shell, you can run many commands
|
|
62
|
+
kaggle datasets list
|
|
63
|
+
kaggle competitions list
|
|
64
|
+
...
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Lint / Format
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
# Lint check
|
|
71
|
+
hatch run lint:style
|
|
72
|
+
hatch run lint:typing
|
|
73
|
+
hatch run lint:all # for both
|
|
74
|
+
|
|
75
|
+
# Format
|
|
76
|
+
hatch run lint:fmt
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Tests
|
|
80
|
+
|
|
81
|
+
Note: These tests are not true unit tests and are calling the Kaggle web server.
|
|
82
|
+
|
|
83
|
+
```sh
|
|
84
|
+
# Run against kaggle.com
|
|
85
|
+
hatch run test:prod
|
|
86
|
+
|
|
87
|
+
# Run against a local web server (Kaggle engineers only)
|
|
88
|
+
hatch run test:local
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Integration Tests
|
|
92
|
+
|
|
93
|
+
To run integration tests on your local machine, you need to set up your Kaggle credentials. You can do this by following the [authentication instructions](docs/README.md#authentication).
|
|
94
|
+
|
|
95
|
+
After setting up your credentials, you can run the integration tests as follows:
|
|
96
|
+
|
|
97
|
+
```sh
|
|
98
|
+
hatch run test:integration
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Changelog
|
|
102
|
+
|
|
103
|
+
See [CHANGELOG](CHANGELOG.md).
|
|
104
|
+
|
|
105
|
+
## Contributing
|
|
106
|
+
|
|
107
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
108
|
+
|
|
109
|
+
## License
|
|
110
|
+
|
|
111
|
+
The Kaggle CLI is released under the [Apache 2.0 license](LICENSE.txt).
|
|
@@ -8,6 +8,6 @@ Security updates are applied only to the latest release.
|
|
|
8
8
|
|
|
9
9
|
If you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.** This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released.
|
|
10
10
|
|
|
11
|
-
Please disclose it at [security advisory](https://github.com/Kaggle/kaggle-
|
|
11
|
+
Please disclose it at [security advisory](https://github.com/Kaggle/kaggle-cli/security/advisories/new).
|
|
12
12
|
|
|
13
13
|
The vulnerabilities will be addressed as soon as possible, with a maximum of 90 days before a public exposure.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Kaggle CLI Documentation
|
|
2
|
+
|
|
3
|
+
Welcome to the Kaggle CLI documentation. This guide provides detailed information on how to use the Kaggle command-line interface to interact with Kaggle's platform.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Note: Ensure you have Python 3.11+ and the package manager `pip` installed.
|
|
8
|
+
|
|
9
|
+
Install the `kaggle` package with [pip](https://pypi.org/project/pip/):
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
pip install kaggle
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
If you run into a `Command kaggle not found` error, ensure that your Python executable scripts are in your $PATH. For a local user install on Linux, the default location is `~/.local/bin`. On Windows, the default location is `$PYTHON_HOME/Scripts`.
|
|
16
|
+
|
|
17
|
+
## Authentication
|
|
18
|
+
|
|
19
|
+
First, you will need a Kaggle account. You can sign up [here](https://www.kaggle.com/account/login).
|
|
20
|
+
|
|
21
|
+
After login, you can download your Kaggle API credentials at https://www.kaggle.com/settings by clicking on the "Generate New Token" button under the "API" section.
|
|
22
|
+
|
|
23
|
+
### Option 1: Environment variable
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
export KAGGLE_API_TOKEN=xxxxxxxxxxxxxx # Copied from the settings UI
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Option 2: API token file
|
|
30
|
+
|
|
31
|
+
Store your Kaggle API token obtained from your [Kaggle account settings page](https://www.kaggle.com/settings) in a file at `~/.kaggle/access_token`.
|
|
32
|
+
|
|
33
|
+
### Option 3: Legacy API credentials file
|
|
34
|
+
|
|
35
|
+
From your [Kaggle account settings page](https://www.kaggle.com/settings), under "Legacy API Credentials", click on the "Create Legacy API Key" button to generate a `kaggle.json` file and store it at `~/.kaggle/kaggle.json`.
|
|
36
|
+
|
|
37
|
+
## CLI Usage
|
|
38
|
+
|
|
39
|
+
Run the following command to list the available commands:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
kaggle --help
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The Kaggle CLI is organized into several command groups:
|
|
46
|
+
|
|
47
|
+
* [Competitions](./competitions.md): Manage and participate in Kaggle competitions.
|
|
48
|
+
* [Datasets](./datasets.md): Search, download, and manage Kaggle datasets.
|
|
49
|
+
* [Kernels](./kernels.md): Interact with Kaggle Kernels (notebooks and scripts).
|
|
50
|
+
* [Models](./models.md): Manage your Kaggle Models.
|
|
51
|
+
* [Model Variations](./model_instances.md): Manage variations of your Kaggle Models.
|
|
52
|
+
* [Model Variation Versions](./model_instances_versions.md): Manage versions of your Kaggle Model Variations.
|
|
53
|
+
* [Configuration](./configuration.md): Configure the Kaggle CLI.
|
|
54
|
+
|
|
55
|
+
## Tutorials
|
|
56
|
+
|
|
57
|
+
Explore these tutorials to learn how to perform common tasks:
|
|
58
|
+
|
|
59
|
+
* [Tutorials](./tutorials.md)
|
|
60
|
+
* [Create a Dataset](./tutorials.md#tutorial-create-a-dataset)
|
|
61
|
+
* [Find and Download a Dataset](./tutorials.md#tutorial-find-and-download-a-dataset)
|
|
62
|
+
* [Create a Model](./tutorials.md#tutorial-create-a-model)
|
|
63
|
+
* [Create a Model Variation](./tutorials.md#tutorial-create-a-model-variation)
|
|
64
|
+
* [Create a Model Variation Version](./tutorials.md#tutorial-create-a-model-variation-version)
|
|
65
|
+
* [How to Submit to a Competition](./tutorials.md#tutorial-how-to-submit-to-a-competition)
|
|
66
|
+
* [How to Submit to a Code Competition](./tutorials.md#tutorial-how-to-submit-to-a-code-competition)
|
|
@@ -129,10 +129,10 @@ kaggle competitions submit <COMPETITION> -f <FILE_NAME> -m <MESSAGE> [options]
|
|
|
129
129
|
**Options:**
|
|
130
130
|
|
|
131
131
|
* `-k, --kernel <KERNEL>`: Name of the kernel (notebook) to submit (for code competitions).
|
|
132
|
-
* `-v, --version <VERSION>`: Version of the kernel to submit.
|
|
132
|
+
* `-v, --version <VERSION>`: Version of the kernel to submit (e.g. `2`).
|
|
133
133
|
* `-q, --quiet`: Suppress verbose output.
|
|
134
134
|
|
|
135
|
-
**Example:**
|
|
135
|
+
**Example: Standard (not code) competition:**
|
|
136
136
|
|
|
137
137
|
Submit `sample_submission.csv` to the "house-prices-advanced-regression-techniques" competition with the message "Test message":
|
|
138
138
|
|
|
@@ -140,6 +140,14 @@ Submit `sample_submission.csv` to the "house-prices-advanced-regression-techniqu
|
|
|
140
140
|
kaggle competitions submit house-prices-advanced-regression-techniques -f sample_submission.csv -m "Test message"
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
+
**Example: Code competition:**
|
|
144
|
+
|
|
145
|
+
Submit the `submission.csv` produced by version `3` of your `<YOUR_USERNAME>/rsna-submission` for the `rsna-2024-lumbar-spine-degenerative-classification` competition:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
kaggle competitions submit rsna-2024-lumbar-spine-degenerative-classification -f submission.csv -k <YOUR_USERNAME>/rsna-submission -v 3 -m "Test message"
|
|
149
|
+
```
|
|
150
|
+
|
|
143
151
|
**Purpose:**
|
|
144
152
|
|
|
145
153
|
Use this command to upload your predictions or code to a competition for scoring.
|
|
@@ -132,7 +132,7 @@ This command allows you to retrieve dataset files for local use.
|
|
|
132
132
|
|
|
133
133
|
## `kaggle datasets init`
|
|
134
134
|
|
|
135
|
-
Initializes a metadata file (`dataset-metadata.json`) for creating a new dataset.
|
|
135
|
+
Initializes a metadata file (`dataset-metadata.json`) for creating a new dataset. See [metadata file format](./datasets_metadata.md).
|
|
136
136
|
|
|
137
137
|
**Usage:**
|
|
138
138
|
|
|
@@ -72,7 +72,7 @@ The following metadata is currently supported:
|
|
|
72
72
|
* `fields`: Array of fields in the dataset. Please note that this needs to include ALL of the fields in the data in order or they will not be matched up correctly. A later version of the API will fix this bug.
|
|
73
73
|
* `name`: Field name
|
|
74
74
|
* `title`: Field description
|
|
75
|
-
* `type`: Field type. A best-effort list of types will be kept at the bottom of this
|
|
75
|
+
* `type`: Field type. A best-effort list of types will be kept at the bottom of this page, but new types may be added that are not documented here.
|
|
76
76
|
* `keywords`: Contains an array of strings that correspond to an existing tag on Kaggle. If a specified tag doesn't exist, the upload will continue, but that specific tag won't be added.
|
|
77
77
|
* `kaggle datasets version` (create a new version for an existing Dataset):
|
|
78
78
|
* `subtitle`: Subtitle of the dataset, must be between 20 and 80 characters in length.
|
|
@@ -86,7 +86,7 @@ The following metadata is currently supported:
|
|
|
86
86
|
* `fields`: Array of fields in the dataset. Please note that this needs to include ALL of the fields in the data in order or they will not be matched up correctly. A later version of the API will fix this bug.
|
|
87
87
|
* `name`: Field name
|
|
88
88
|
* `title`: Field description
|
|
89
|
-
* `type`: Field type. A best-effort list of types will be kept at the bottom of this
|
|
89
|
+
* `type`: Field type. A best-effort list of types will be kept at the bottom of this page, but new types may be added that are not documented here.
|
|
90
90
|
* `keywords`: Contains an array of strings that correspond to an existing tag on Kaggle. If a specified tag doesn't exist, the upload will continue, but that specific tag won't be added.
|
|
91
91
|
|
|
92
92
|
We will add further metadata processing in upcoming versions of the API.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
.. _kaggle:
|
|
2
2
|
|
|
3
|
-
.. kaggle-
|
|
3
|
+
.. kaggle-cli documentation master file, created by
|
|
4
4
|
sphinx-quickstart on Thu Jun 26 22:53:21 2025.
|
|
5
5
|
You can adapt this file completely to your liking, but it should at least
|
|
6
6
|
contain the root `toctree` directive.
|
|
7
7
|
|
|
8
|
-
kaggle-
|
|
8
|
+
kaggle-cli documentation
|
|
9
9
|
========================
|
|
10
10
|
|
|
11
11
|
.. toctree::
|
|
@@ -98,7 +98,7 @@ Use this command to view the files generated by a kernel run.
|
|
|
98
98
|
|
|
99
99
|
## `kaggle kernels init`
|
|
100
100
|
|
|
101
|
-
Initializes a metadata file (`kernel-metadata.json`) for a new or existing kernel.
|
|
101
|
+
Initializes a metadata file (`kernel-metadata.json`) for a new or existing kernel. See [metadata file format](./kernels_metadata.md).
|
|
102
102
|
|
|
103
103
|
**Usage:**
|
|
104
104
|
|
|
@@ -134,6 +134,7 @@ kaggle kernels push -p <FOLDER_PATH> [options]
|
|
|
134
134
|
|
|
135
135
|
**Options:**
|
|
136
136
|
|
|
137
|
+
* `--accelerator <ACCELERATOR_ID>`: ID name of the accelerator to use during the run. E.g. "NvidiaTeslaP100" (aka default GPU), "NvidiaTeslaT4", "TpuV6E8".
|
|
137
138
|
* `-p, --path <FOLDER_PATH>`: Path to the folder containing the kernel file (e.g., `.ipynb`, `.Rmd`, `.py`) and the `kernel-metadata.json` file (defaults to the current directory).
|
|
138
139
|
* `-t, --timeout <SECONDS>`: Maximum run time in seconds.
|
|
139
140
|
|
|
@@ -149,6 +150,23 @@ kaggle kernels push -p tests/kernel
|
|
|
149
150
|
|
|
150
151
|
This command uploads your local kernel file and its metadata to Kaggle. If the kernel specified in the metadata exists under your account, it will be updated. Otherwise, a new kernel will be created. After uploading, Kaggle will attempt to run the kernel.
|
|
151
152
|
|
|
153
|
+
Accelerators available as of Feb 2026:
|
|
154
|
+
|
|
155
|
+
* NvidiaTeslaP100
|
|
156
|
+
* TpuV38
|
|
157
|
+
* NvidiaTeslaT4
|
|
158
|
+
* NvidiaTeslaT4Highmem
|
|
159
|
+
* Tpu1VmV38
|
|
160
|
+
* NvidiaTeslaA100
|
|
161
|
+
* NvidiaL4
|
|
162
|
+
* TpuV5E8
|
|
163
|
+
* NvidiaL4X1
|
|
164
|
+
* TpuV6E8
|
|
165
|
+
* NvidiaH100
|
|
166
|
+
* NvidiaRtxPro6000
|
|
167
|
+
|
|
168
|
+
Some of these are only available to participants of specific competitions, and some are only available to Kaggle admins.
|
|
169
|
+
|
|
152
170
|
## `kaggle kernels pull`
|
|
153
171
|
|
|
154
172
|
Pulls down the code/notebook and metadata for a kernel.
|
|
@@ -207,6 +225,7 @@ kaggle kernels output <KERNEL> [options]
|
|
|
207
225
|
* `-w, --wp`: Download files to the current working path.
|
|
208
226
|
* `-o, --force`: Force download, overwriting existing files.
|
|
209
227
|
* `-q, --quiet`: Suppress verbose output.
|
|
228
|
+
* `--file-pattern <REGEX>`: Regex pattern to match against filenames. Only files matching the pattern will be downloaded.
|
|
210
229
|
|
|
211
230
|
**Example:**
|
|
212
231
|
|
|
@@ -215,6 +234,11 @@ Download the output of the kernel `kerneler/using-google-bird-vocalization-model
|
|
|
215
234
|
```bash
|
|
216
235
|
kaggle kernels output kerneler/sqlite-global-default -o
|
|
217
236
|
```
|
|
237
|
+
Download PNG files only:
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
kaggle kernels output <kernel> --file-pattern ".*\.png$" # Only PNG files
|
|
241
|
+
```
|
|
218
242
|
|
|
219
243
|
**Purpose:**
|
|
220
244
|
|
|
@@ -5,6 +5,7 @@ Commands for interacting with variations of Kaggle Models. A model variation typ
|
|
|
5
5
|
## `kaggle models variations init`
|
|
6
6
|
|
|
7
7
|
Initializes a metadata file (`model-instance-metadata.json`) for creating a new model variation.
|
|
8
|
+
Note that the name of the file reflects the old name for a variation, which was "instance".
|
|
8
9
|
|
|
9
10
|
**Usage:**
|
|
10
11
|
|
|
@@ -52,7 +53,7 @@ Create a new model variation using the metadata and files in the `tmp` folder, q
|
|
|
52
53
|
# Example: Edit model-instance-metadata.json first
|
|
53
54
|
# sed -i 's/INSERT_OWNER_SLUG_HERE/your-username/' tmp/model-instance-metadata.json
|
|
54
55
|
# sed -i 's/INSERT_EXISTING_MODEL_SLUG_HERE/parent-model-slug/' tmp/model-instance-metadata.json
|
|
55
|
-
# sed -i 's/INSERT_INSTANCE_SLUG_HERE/my-
|
|
56
|
+
# sed -i 's/INSERT_INSTANCE_SLUG_HERE/my-variation-slug/' tmp/model-instance-metadata.json
|
|
56
57
|
# sed -i 's/INSERT_FRAMEWORK_HERE/jax/' tmp/model-instance-metadata.json
|
|
57
58
|
# echo "a,b,c,d" > tmp/data.csv # Example model file
|
|
58
59
|
|
|
@@ -70,12 +71,12 @@ Downloads the `model-instance-metadata.json` file for an existing model variatio
|
|
|
70
71
|
**Usage:**
|
|
71
72
|
|
|
72
73
|
```bash
|
|
73
|
-
kaggle models variations get <
|
|
74
|
+
kaggle models variations get <MODEL_VARIATION> -p <FOLDER_PATH>
|
|
74
75
|
```
|
|
75
76
|
|
|
76
77
|
**Arguments:**
|
|
77
78
|
|
|
78
|
-
* `<
|
|
79
|
+
* `<MODEL_VARIATION>`: Model variation URL suffix in the format `owner/model-slug/framework/variation-slug` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`).
|
|
79
80
|
|
|
80
81
|
**Options:**
|
|
81
82
|
|
|
@@ -100,12 +101,12 @@ Lists files for the current version of a model variation.
|
|
|
100
101
|
**Usage:**
|
|
101
102
|
|
|
102
103
|
```bash
|
|
103
|
-
kaggle models variations files <
|
|
104
|
+
kaggle models variations files <MODEL_VARIATION> [options]
|
|
104
105
|
```
|
|
105
106
|
|
|
106
107
|
**Arguments:**
|
|
107
108
|
|
|
108
|
-
* `<
|
|
109
|
+
* `<MODEL_VARIATION>`: Model variation URL suffix (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`).
|
|
109
110
|
|
|
110
111
|
**Options:**
|
|
111
112
|
|
|
@@ -158,12 +159,12 @@ Deletes a model variation from Kaggle.
|
|
|
158
159
|
**Usage:**
|
|
159
160
|
|
|
160
161
|
```bash
|
|
161
|
-
kaggle models variations delete <
|
|
162
|
+
kaggle models variations delete <MODEL_VARIATION> [options]
|
|
162
163
|
```
|
|
163
164
|
|
|
164
165
|
**Arguments:**
|
|
165
166
|
|
|
166
|
-
* `<
|
|
167
|
+
* `<MODEL_VARIATION>`: Model variation URL suffix in the format `owner/model-slug/framework/variation-slug` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`).
|
|
167
168
|
|
|
168
169
|
**Options:**
|
|
169
170
|
|
|
@@ -9,12 +9,12 @@ Creates a new version of an existing model variation.
|
|
|
9
9
|
**Usage:**
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
kaggle models variations versions create <
|
|
12
|
+
kaggle models variations versions create <MODEL_VARIATION> -p <FOLDER_PATH> [options]
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
**Arguments:**
|
|
16
16
|
|
|
17
|
-
* `<
|
|
17
|
+
* `<MODEL_VARIATION>`: The target model variation URL suffix for the new version (format: `owner/model-slug/framework/variation-slug`, e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`).
|
|
18
18
|
|
|
19
19
|
**Options:**
|
|
20
20
|
|
|
@@ -45,12 +45,12 @@ Downloads files for a specific version of a model variation.
|
|
|
45
45
|
**Usage:**
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
kaggle models variations versions download <
|
|
48
|
+
kaggle models variations versions download <MODEL_VARIATION_VERSION> [options]
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
**Arguments:**
|
|
52
52
|
|
|
53
|
-
* `<
|
|
53
|
+
* `<MODEL_VARIATION_VERSION>`: Model variation version URL suffix in the format `owner/model-slug/framework/variation-slug/version-number` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main/1`).
|
|
54
54
|
|
|
55
55
|
**Options:**
|
|
56
56
|
|
|
@@ -79,12 +79,12 @@ Lists files for a specific version of a model variation.
|
|
|
79
79
|
**Usage:**
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
|
-
kaggle models variations versions files <
|
|
82
|
+
kaggle models variations versions files <MODEL_VARIATION_VERSION> [options]
|
|
83
83
|
```
|
|
84
84
|
|
|
85
85
|
**Arguments:**
|
|
86
86
|
|
|
87
|
-
* `<
|
|
87
|
+
* `<MODEL_VARIATION_VERSION>`: Model variation version URL suffix (e.g., `google/gemma/pytorch/7b/2`).
|
|
88
88
|
|
|
89
89
|
**Options:**
|
|
90
90
|
|
|
@@ -111,12 +111,12 @@ Deletes a specific version of a model variation from Kaggle.
|
|
|
111
111
|
**Usage:**
|
|
112
112
|
|
|
113
113
|
```bash
|
|
114
|
-
kaggle models variations versions delete <
|
|
114
|
+
kaggle models variations versions delete <MODEL_VARIATION_VERSION> [options]
|
|
115
115
|
```
|
|
116
116
|
|
|
117
117
|
**Arguments:**
|
|
118
118
|
|
|
119
|
-
* `<
|
|
119
|
+
* `<MODEL_VARIATION_VERSION>`: Model variation version URL suffix in the format `owner/model-slug/framework/variation-slug/version-number` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main/1`).
|
|
120
120
|
|
|
121
121
|
**Options:**
|
|
122
122
|
|