Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Kaggle API

Official API for https://www.kaggle.com, accessible using a command line tool implemented in Python 3.

User documentation

Installation

Ensure you have Python 3 and the package manager pip installed.

Run the following command to access the Kaggle API using the command line:

pip install kaggle

Development

Prerequisites

We use hatch to manage this project.

Follow these instructions to install it.

Dependencies

hatch run install-deps

Compile

hatch run compile

The compiled files are generated in the kaggle/ directory from the src/ directory.

All the changes must be done in the src/ directory.

Run

You can also run the code in python directly:

hatch run python
import kaggle_waggle
from kaggle_waggle.api.kaggle_api_extended import KaggleApi
api = KaggleApi()
api.authenticate()
api.model_list_cli()

Next Page Token = [...]
[...]

Or in a single command:

hatch run python -c "import kaggle_waggle; from kaggle_waggle.api.kaggle_api_extended import KaggleApi; api = KaggleApi(); api.authenticate(); api.model_list_cli()"

Example

Let's change the model_list_cli method in the source file:

❯ git diff src/kaggle/api/kaggle_api_extended.py
[...]
+        print('hello Kaggle CLI update')^M
         models = self.model_list(sort_by, search, owner, page_size, page_token)
[...]

❯ hatch run compile
[...]

❯ hatch run python -c "import kaggle_waggle; from kaggle_waggle.api.kaggle_api_extended import KaggleApi; api = KaggleApi(); api.authenticate(); api.model_list_cli()"
hello Kaggle CLI update
Next Page Token = [...]

Integration Tests

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. Refer to the sections:

  • Using environment variables
  • Using credentials file

After setting up your credentials by any of these methods, you can run the integration tests as follows:

# Run all tests
hatch run integration-test

License

The Kaggle API is released under the Apache 2.0 license.

Metadata

Release files for kaggle_waggle 1.6.12a9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kaggle_waggle 1.6.12a9
File Size Uploaded Provenance Actions
kaggle_waggle-1.6.12a9.tar.gz 24.5 MB Without provenance Details for kaggle_waggle-1.6.12a9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kaggle_waggle 1.6.12a9
File Interpreter ABI Platform Actions
kaggle_waggle-1.6.12a9-py3-none-any.whl Python 3 none any Details for kaggle_waggle-1.6.12a9-py3-none-any.whl

Total release size: 24.6 MB

Release files / kaggle_waggle-1.6.12a9.tar.gz

Download URL kaggle_waggle-1.6.12a9.tar.gz
Size 24.5 MB
Tags Source
SHA-256 checksum
How to use checksums
3fde1f394378a95c418378a52a988f037c664a652582135c0d1927b3ea2de0ae
BLAKE2b-256 checksum
How to use checksums
bcf87ffa822c9b096dbb5b3833584c1fee1a7701ec551d0ba5c2a8e485e1f877
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.0

Release files / kaggle_waggle-1.6.12a9-py3-none-any.whl

Download URL kaggle_waggle-1.6.12a9-py3-none-any.whl
Size 118.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a7ff291bb6607f44b0c0eb292ceb98dc44d4c8447fc7422dc0885ec963df011
BLAKE2b-256 checksum
How to use checksums
bbafc6f4b6f96e98f24f20c8a04d0b8779d28d292ff2adcd850972dfc85f639d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.0

Security for kaggle_waggle 1.6.12a9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page