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.
Files changed (95) hide show
  1. {kaggle-1.8.3 → kaggle-1.8.4}/CHANGELOG.md +9 -0
  2. {kaggle-1.8.3 → kaggle-1.8.4}/PKG-INFO +65 -74
  3. kaggle-1.8.4/README.md +111 -0
  4. {kaggle-1.8.3 → kaggle-1.8.4}/SECURITY.md +1 -1
  5. kaggle-1.8.4/docs/README.md +66 -0
  6. {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/competitions.md +10 -2
  7. {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/conf.py +1 -1
  8. {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/datasets.md +1 -1
  9. {kaggle-1.8.3 → kaggle-1.8.4}/docs/datasets_metadata.md +2 -2
  10. {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/index.rst +2 -2
  11. {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/kernels.md +25 -1
  12. {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/model_instances.md +8 -7
  13. {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/model_instances_versions.md +8 -8
  14. {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/models.md +1 -1
  15. {kaggle-1.8.3 → kaggle-1.8.4}/docs/models_metadata.md +15 -21
  16. {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/tutorials.md +12 -7
  17. {kaggle-1.8.3 → kaggle-1.8.4}/integration_tests/test_models.py +0 -2
  18. {kaggle-1.8.3 → kaggle-1.8.4}/pyproject.toml +34 -28
  19. {kaggle-1.8.3 → kaggle-1.8.4}/src/kaggle/__init__.py +1 -1
  20. {kaggle-1.8.3 → kaggle-1.8.4}/src/kaggle/api/kaggle_api_extended.py +183 -74
  21. {kaggle-1.8.3 → kaggle-1.8.4}/src/kaggle/cli.py +36 -28
  22. kaggle-1.8.4/src/kaggle/models/__init__.py +0 -0
  23. {kaggle-1.8.3 → kaggle-1.8.4}/src/kaggle/models/upload_file.py +4 -4
  24. kaggle-1.8.4/tests/__init__.py +0 -0
  25. {kaggle-1.8.3 → kaggle-1.8.4}/tests/test_commands.sh +1 -1
  26. {kaggle-1.8.3 → kaggle-1.8.4}/tests/unit_tests.py +2 -2
  27. {kaggle-1.8.3 → kaggle-1.8.4}/tools/cicd/integration-tests.yaml +1 -1
  28. {kaggle-1.8.3 → kaggle-1.8.4}/tools/releases/requirements.txt +3 -3
  29. kaggle-1.8.3/README.md +0 -115
  30. kaggle-1.8.3/docs/ApiBlobType.md +0 -9
  31. kaggle-1.8.3/docs/Collaborator.md +0 -11
  32. kaggle-1.8.3/docs/CreateInboxFileRequest.md +0 -11
  33. kaggle-1.8.3/docs/DatasetColumn.md +0 -14
  34. kaggle-1.8.3/docs/DatasetNewRequest.md +0 -19
  35. kaggle-1.8.3/docs/DatasetNewVersionRequest.md +0 -16
  36. kaggle-1.8.3/docs/DatasetUpdateSettingsRequest.md +0 -17
  37. kaggle-1.8.3/docs/Error.md +0 -11
  38. kaggle-1.8.3/docs/KaggleApi.md +0 -2398
  39. kaggle-1.8.3/docs/KernelPushRequest.md +0 -25
  40. kaggle-1.8.3/docs/License.md +0 -10
  41. kaggle-1.8.3/docs/ModelInstanceNewVersionRequest.md +0 -11
  42. kaggle-1.8.3/docs/ModelInstanceUpdateRequest.md +0 -18
  43. kaggle-1.8.3/docs/ModelNewInstanceRequest.md +0 -20
  44. kaggle-1.8.3/docs/ModelNewRequest.md +0 -17
  45. kaggle-1.8.3/docs/ModelUpdateRequest.md +0 -16
  46. kaggle-1.8.3/docs/README.md +0 -1000
  47. kaggle-1.8.3/docs/Result.md +0 -9
  48. kaggle-1.8.3/docs/StartBlobUploadRequest.md +0 -14
  49. kaggle-1.8.3/docs/StartBlobUploadResponse.md +0 -11
  50. kaggle-1.8.3/docs/UploadFile.md +0 -12
  51. kaggle-1.8.3/docs/conf.py +0 -65
  52. kaggle-1.8.3/docs/index.rst +0 -5
  53. kaggle-1.8.3/docs/model_card.md +0 -67
  54. kaggle-1.8.3/docs/modelinstance_usage.md +0 -27
  55. kaggle-1.8.3/documentation/intro.md +0 -70
  56. kaggle-1.8.3/src/kaggle/models/api_blob_type.py +0 -4
  57. kaggle-1.8.3/src/kaggle/models/dataset_column.py +0 -228
  58. kaggle-1.8.3/src/kaggle/models/dataset_new_request.py +0 -443
  59. kaggle-1.8.3/src/kaggle/models/dataset_new_version_request.py +0 -319
  60. kaggle-1.8.3/src/kaggle/models/dataset_update_settings_request.py +0 -344
  61. kaggle-1.8.3/src/kaggle/models/kernel_push_request.py +0 -608
  62. kaggle-1.8.3/src/kaggle/models/model_instance_new_version_request.py +0 -145
  63. kaggle-1.8.3/src/kaggle/models/model_instance_update_request.py +0 -451
  64. kaggle-1.8.3/src/kaggle/models/model_new_instance_request.py +0 -552
  65. kaggle-1.8.3/src/kaggle/models/model_new_request.py +0 -329
  66. kaggle-1.8.3/src/kaggle/models/model_update_request.py +0 -300
  67. kaggle-1.8.3/src/kaggle/models/start_blob_upload_request.py +0 -240
  68. kaggle-1.8.3/src/kaggle/models/start_blob_upload_response.py +0 -142
  69. kaggle-1.8.3/tools/GeneratePythonLibrary.sh +0 -209
  70. {kaggle-1.8.3 → kaggle-1.8.4}/.gcloudignore +0 -0
  71. {kaggle-1.8.3 → kaggle-1.8.4}/.github/workflows/no-response.yaml +0 -0
  72. {kaggle-1.8.3 → kaggle-1.8.4}/.gitignore +0 -0
  73. {kaggle-1.8.3 → kaggle-1.8.4}/CONTRIBUTING.md +0 -0
  74. {kaggle-1.8.3 → kaggle-1.8.4}/GEMINI.md +0 -0
  75. {kaggle-1.8.3 → kaggle-1.8.4}/LICENSE.txt +0 -0
  76. {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/Makefile +0 -0
  77. {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/configuration.md +0 -0
  78. {kaggle-1.8.3 → kaggle-1.8.4}/docs/kernels_metadata.md +0 -0
  79. {kaggle-1.8.3/documentation → kaggle-1.8.4/docs}/make.bat +0 -0
  80. {kaggle-1.8.3/src/kaggle/api → kaggle-1.8.4/integration_tests}/__init__.py +0 -0
  81. {kaggle-1.8.3 → kaggle-1.8.4}/src/kaggle/LICENSE +0 -0
  82. {kaggle-1.8.3/src/kaggle/models → kaggle-1.8.4/src/kaggle/api}/__init__.py +0 -0
  83. {kaggle-1.8.3 → kaggle-1.8.4}/src/kaggle/api/kaggle_api.py +0 -0
  84. {kaggle-1.8.3 → kaggle-1.8.4}/src/kaggle/models/kaggle_models_extended.py +0 -0
  85. {kaggle-1.8.3 → kaggle-1.8.4}/src/kaggle/test/test_authenticate.py +0 -0
  86. {kaggle-1.8.3 → kaggle-1.8.4}/tests/dataset/data.csv +0 -0
  87. {kaggle-1.8.3 → kaggle-1.8.4}/tests/kernel/testing-x.ipynb +0 -0
  88. {kaggle-1.8.3 → kaggle-1.8.4}/tests/model/instance/data.csv +0 -0
  89. {kaggle-1.8.3 → kaggle-1.8.4}/tests/model/instance/version/metadata.json +0 -0
  90. {kaggle-1.8.3 → kaggle-1.8.4}/tests/sample_submission.csv +0 -0
  91. {kaggle-1.8.3 → kaggle-1.8.4}/tools/releases/Dockerfile +0 -0
  92. {kaggle-1.8.3 → kaggle-1.8.4}/tools/releases/cloudbuild.yaml +0 -0
  93. {kaggle-1.8.3 → kaggle-1.8.4}/tools/releases/requirements.in +0 -0
  94. {kaggle-1.8.3 → kaggle-1.8.4}/tools/use-localhost.sh +0 -0
  95. {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
3
+ Version: 1.8.4
4
4
  Summary: Access Kaggle resources anywhere
5
- Project-URL: Homepage, https://github.com/Kaggle/kaggle-api
6
- Project-URL: Issues, https://github.com/Kaggle/kaggle-api/issues
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.14
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 API
226
+ # Kaggle CLI
232
227
 
233
- Official API for https://www.kaggle.com, accessible using a command line tool implemented in Python 3.
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
- ## Installation
234
+ ---
238
235
 
239
- Ensure you have Python 3 and the package manager `pip` installed.
236
+ ## Key Features
240
237
 
241
- Run the following command to access the Kaggle API using the command line:
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
- ## Development
253
+ Additional installation instructions can be found [here](docs/README.md#installation).
248
254
 
249
- ### Kaggle Internal
255
+ ## Quick start
250
256
 
251
- Obviously, this depends on Kaggle services. When you're extending the API and modifying
252
- or adding to those services, you should be working in your Kaggle mid-tier development
253
- environment. You'll run Kaggle locally, in the container, and test the Python code by
254
- running it in the container so it can connect to your local testing environment.
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
- If you are working in a managed environment, you may want to use `pipx`. If it isn't already installed
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
- ### Dependencies
275
+ #### Option 1: Execute a one-liner of code from the command line
266
276
 
267
277
  ```sh
268
- hatch run install-deps
278
+ hatch run kaggle datasets list
269
279
  ```
270
280
 
271
- ### Compile
281
+ #### Option 2: Run many commands in a shell
272
282
 
273
283
  ```sh
274
- hatch run compile
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
- The compiled files are generated in the `kaggle/` directory from the `src/` directory.
292
+ ### Lint / Format
278
293
 
279
- All the changes must be done in the `src/` directory.
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
- ### Run
300
+ # Format
301
+ hatch run lint:fmt
302
+ ```
282
303
 
283
- Use `hatch run install` to compile the program and install it in the default `hatch` environment.
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
- You can also run the code in python directly:
306
+ Note: These tests are not true unit tests and are calling the Kaggle web server.
288
307
 
289
308
  ```sh
290
- hatch run python
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
- Or in a single command:
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
- ### Example
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
- Let's change the `model_list_cli` method in the source file:
320
+ After setting up your credentials, you can run the integration tests as follows:
314
321
 
315
322
  ```sh
316
- git diff src/kaggle/api/kaggle_api_extended.py
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
- ### Integration Tests
326
+ ## Changelog
331
327
 
332
- To run integration tests on your local machine, you need to set up your Kaggle API credentials. You can do this in one of these two ways described [this doc](docs/README.md). Refer to the sections:
333
- - Using environment variables
334
- - Using credentials file
328
+ See [CHANGELOG](CHANGELOG.md).
335
329
 
336
- After setting up your credentials by any of these methods, you can run the integration tests as follows:
330
+ ## Contributing
337
331
 
338
- ```sh
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 API is released under the [Apache 2.0 license](LICENSE).
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-api/security/advisories/new).
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.
@@ -31,7 +31,7 @@ def setup(app):
31
31
  app.connect("autodoc-skip-member", autodoc_skip_member)
32
32
 
33
33
 
34
- project = "kaggle-api"
34
+ project = "kaggle-cli"
35
35
  copyright = "2025, Kaggle"
36
36
  author = "Kaggle"
37
37
 
@@ -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 wiki page, but new types may be added that are not documented here.
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 wiki page, but new types may be added that are not documented here.
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-api documentation master file, created by
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-api documentation
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-instance-slug/' tmp/model-instance-metadata.json
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 <MODEL_INSTANCE> -p <FOLDER_PATH>
74
+ kaggle models variations get <MODEL_VARIATION> -p <FOLDER_PATH>
74
75
  ```
75
76
 
76
77
  **Arguments:**
77
78
 
78
- * `<MODEL_INSTANCE>`: Model variation URL suffix in the format `owner/model-slug/framework/instance-slug` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`).
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 <MODEL_INSTANCE> [options]
104
+ kaggle models variations files <MODEL_VARIATION> [options]
104
105
  ```
105
106
 
106
107
  **Arguments:**
107
108
 
108
- * `<MODEL_INSTANCE>`: Model variation URL suffix (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`).
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 <MODEL_INSTANCE> [options]
162
+ kaggle models variations delete <MODEL_VARIATION> [options]
162
163
  ```
163
164
 
164
165
  **Arguments:**
165
166
 
166
- * `<MODEL_INSTANCE>`: Model variation URL suffix in the format `owner/model-slug/framework/instance-slug` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`).
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 <MODEL_INSTANCE> -p <FOLDER_PATH> [options]
12
+ kaggle models variations versions create <MODEL_VARIATION> -p <FOLDER_PATH> [options]
13
13
  ```
14
14
 
15
15
  **Arguments:**
16
16
 
17
- * `<MODEL_INSTANCE>`: The target model variation URL suffix for the new version (format: `owner/model-slug/framework/instance-slug`, e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`).
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 <MODEL_INSTANCE_VERSION> [options]
48
+ kaggle models variations versions download <MODEL_VARIATION_VERSION> [options]
49
49
  ```
50
50
 
51
51
  **Arguments:**
52
52
 
53
- * `<MODEL_INSTANCE_VERSION>`: Model variation version URL suffix in the format `owner/model-slug/framework/instance-slug/version-number` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main/1`).
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 <MODEL_INSTANCE_VERSION> [options]
82
+ kaggle models variations versions files <MODEL_VARIATION_VERSION> [options]
83
83
  ```
84
84
 
85
85
  **Arguments:**
86
86
 
87
- * `<MODEL_INSTANCE_VERSION>`: Model variation version URL suffix (e.g., `google/gemma/pytorch/7b/2`).
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 <MODEL_INSTANCE_VERSION> [options]
114
+ kaggle models variations versions delete <MODEL_VARIATION_VERSION> [options]
115
115
  ```
116
116
 
117
117
  **Arguments:**
118
118
 
119
- * `<MODEL_INSTANCE_VERSION>`: Model variation version URL suffix in the format `owner/model-slug/framework/instance-slug/version-number` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main/1`).
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