--- id: kagglehub version: "1.0.2" 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) license_treatment: permissive maintenance: active --- # kagglehub — Access Kaggle resources anywhere License: permissive · Maintenance: active · Downloads: 2.5M/mo ## 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 above — 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 pip install kagglehub uv add kagglehub 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_current - Install friction: low - Maintenance: active - Downloads: 2.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags kaggle dataset download python, kaggle model api client, access kaggle resources programmatically, kaggle data loader, kaggle notebook integration, download kaggle models datasets, kaggle api python library, kaggle-integration, dataset-download, model-management [View on SkillFed](https://skillfed.io/packages/kagglehub) · [View on PyPI](https://pypi.org/project/kagglehub/)