skillfed

kagglehub

Access Kaggle resources anywhere

kagglehub v1.0.2 2.5M downloads/30d#3,014 on PyPI515
Permissive license Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) Active released

What it is and what it does

kagglehub is a Python client library that simplifies downloading and uploading Kaggle resources—datasets, models, and notebook outputs—directly from your code. It wraps the Kaggle API and provides a straightforward interface for authentication and resource management.

The library behaves differently depending on where it runs: inside a Kaggle notebook, resources are automatically attached and served from Kaggle's shared cache; outside a notebook, files are downloaded to a local cache folder. It supports multiple authentication methods (API token, environment variable, config file, Google Colab secrets) and can load datasets directly into pandas, Hugging Face, or Polars objects via optional adapters. It also handles model uploads with versioning, licensing, and file-ignore patterns.

Use it for:

  • Download pre-trained models from Kaggle to use in local ML projects without manual browser downloads
  • Load Kaggle competition datasets directly into pandas DataFrames or Polars for analysis in Jupyter notebooks
  • Automate dataset and model retrieval in CI/CD pipelines or scheduled data processing workflows
  • Upload trained models to Kaggle with version notes and licensing information for sharing with the community
  • Access private or consent-gated Kaggle resources programmatically after authentication

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

kagglehub provides Python access to Kaggle datasets, models, and notebook outputs with integrated caching and native support for the Kaggle notebook environment.

Yes. kagglehub is actively maintained, has low install friction, carries a permissive Apache 2.0 license, and no known vulnerabilities. Install it if you regularly work with Kaggle datasets or models and want to automate downloads in Python code. The native Kaggle notebook integration and multi-format dataset loading (pandas, Polars, Hugging Face) make it a natural choice for data science workflows.

Install

kagglehub on PyPI

pip

pip install kagglehub

uv

uv add kagglehub

poetry

poetry add kagglehub

Installing kagglehub

Before you install

Low friction installation with five runtime dependencies (kagglesdk, packaging, pyyaml, requests, tqdm). Repository is actively maintained with recent commits and moderate GitHub presence (515 stars). Requires Python 3.10 or later.

License in practice

Licensed under Apache License 2.0 (permissive). You can use, modify, and distribute the package freely in commercial and private projects, provided you include the license notice and document any changes.

Quickstart

pip install kagglehub

import kagglehub

# Authenticate (required for private/consent resources)
kagglehub.login()

# Download a model
kagglehub.model_download('google/bert/tensorFlow2/answer-equivalence-bem')

# Download a dataset
kagglehub.dataset_download('dataset-owner/dataset-name')

Requires Python 3.10 or later. Authentication requires a Kaggle account and API token (generated at https://www.kaggle.com/settings/api).

Verify before relying

  • Whether optional dependencies (pandas, hugging-face, polars) are needed for specific use cases or if core functionality works without them
  • Performance characteristics when downloading large models or datasets outside the Kaggle notebook environment
  • Caching behavior and storage requirements for repeated downloads

Package facts

License Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 5 — kagglesdk, packaging, pyyaml, requests, tqdm
Maintenance actively maintained — 66 days since the last release
Last repo commit
First released
Downloads 2,536,225/month — #3,014 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: kagglehub-1.0.2-py3-none-any.whl

Keywords: API, Kaggle

License :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

kaggle dataset download pythonkaggle model api clientaccess kaggle resources programmaticallykaggle data loaderkaggle notebook integrationdownload kaggle models datasetskaggle api python library
kaggle-integrationdataset-downloadmodel-management

More Internet packages