The `kagglesdk` is the official Python client library for interacting with Kaggle's external-facing APIs, allowing users to programmatically access competitions, datasets, kernels, and more. It is currently at version 0.1.18 and receives frequent updates.
pip install kagglesdkVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to authenticate with the Kaggle API client and then use it to list active competitions. It also includes a commented-out example for downloading a dataset. Ensure your Kaggle API credentials (`kaggle.json` file or `KAGGLE_USERNAME`, `KAGGLE_KEY` environment variables) are correctly configured before running.
Always use `import kaggle` to access the client functionality, then interact via `kaggle.api`.
Generate your Kaggle API token from your Kaggle account settings and place `kaggle.json` in `~/.kaggle/`, or set the corresponding environment variables.
Always provide an absolute path for `path` using `os.path.abspath()` or `os.path.join(os.getcwd(), 'your_dir')` for predictable file locations, and set `unzip=True` if you expect archive files.
Implement delays (e.g., `time.sleep()`) between successive API calls, particularly when performing bulk operations, to avoid hitting rate limits.
Familiarize yourself with the object structure by consulting the Kaggle API documentation or by inspecting objects using `dir()` or `type()`.
No dependency data recorded yet.