The official CLI to interact with Kaggle.
Some of the key features are:
- List competitions, download competition data, submit to a competition.
- List, create, update, download or delete datasets.
- List, create, update, download or delete models & model variations.
- List, update & run, download code & output or delete kernels (notebooks).
Install the kaggle package with pip:
pip install kaggleAdditional installation instructions can be found here.
Explore the available commands by running:
kaggle --helpSee the User documentation for more examples & tutorials.
We use hatch to manage this project.
Follow these instructions to install it.
hatch run kaggle datasets listhatch shell
# Inside the shell, you can run many commands
kaggle datasets list
kaggle competitions list
...# Lint check
hatch run lint:style
hatch run lint:typing
hatch run lint:all # for both
# Format
hatch run lint:fmtNote: These tests are not true unit tests and are calling the Kaggle web server.
# Run against kaggle.com
hatch run test:prod
# Run against a local web server (Kaggle engineers only)
hatch run test:localTo run integration tests on your local machine, you need to set up your Kaggle credentials. You can do this by following the authentication instructions.
After setting up your credentials, you can run the integration tests as follows:
hatch run test:integrationSee CHANGELOG.
See CONTRIBUTING.md.
The Kaggle CLI is released under the Apache 2.0 license.