[
  {
    "path": ".gcloudignore",
    "content": "python"
  },
  {
    "path": ".github/workflows/no-response.yaml",
    "content": "name: No Response\n\n# Both `issue_comment` and `scheduled` event types are required for this Action\n# to work properly.\non:\n  issue_comment:\n    types: [created]\n  schedule:\n    # Schedule for five minutes after midnight, every day\n    - cron: '5 0 * * *'\n\n# By specifying the access of one of the scopes, all of those that are not\n# specified are set to 'none'.\npermissions:\n  issues: write\n\njobs:\n  noResponse:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: lee-dohm/no-response@9bb0a4b5e6a45046f00353d5de7d90fb8bd773bb\n        with:\n          token: ${{ github.token }}\n          # Comment to post when closing an Issue for lack of response. Set to `false` to disable\n          closeComment: >\n            Without additional information we're not able to resolve this issue,\n            so it will be closed at this time. You're still free to add more info\n            and respond to any questions above, though. We'll reopen the case\n            if you do. Thanks for your contribution!\n          # Number of days of inactivity before an issue is closed for lack of response.\n          daysUntilClose: 14\n          # Label requiring a response.\n          responseRequiredLabel: \"waiting for response\""
  },
  {
    "path": ".gitignore",
    "content": "# Byte-compiled / optimized / DLL files\r\n__pycache__/\r\n*.py[cod]\r\n*$py.class\r\n\r\n# C extensions\r\n*.so\r\n\r\n# Distribution / packaging\r\n.Python\r\nenv/\r\nbuild/\r\ndevelop-eggs/\r\ndist/\r\ndownloads/\r\neggs/\r\n.eggs/\r\nkaggle\r\nkagglesdk\r\n!*/kaggle/\r\n!*/kagglesdk/\r\nlib/\r\nlib64/\r\nparts/\r\nsdist/\r\nvar/\r\n*.egg-info/\r\n.installed.cfg\r\n*.egg\r\n\r\n# PyInstaller\r\n#  Usually these files are written by a python script from a template\r\n#  before PyInstaller builds the exe, so as to inject date/other infos into it.\r\n*.manifest\r\n*.spec\r\n\r\n# Installer logs\r\npip-log.txt\r\npip-delete-this-directory.txt\r\n\r\n# Unit test / coverage reports\r\nhtmlcov/\r\n.tox/\r\n.coverage\r\n.coverage.*\r\n.cache\r\nnosetests.xml\r\ncoverage.xml\r\n*,cover\r\n.hypothesis/\r\nvenv/\r\n.python-version\r\n\r\n# Translations\r\n*.mo\r\n*.pot\r\n\r\n# Django stuff:\r\n*.log\r\n\r\n# Sphinx documentation\r\ndocs/_build/\r\n\r\n# PyBuilder\r\ntarget/\r\n\r\n#Ipython Notebook\r\n.ipynb_checkpoints\r\n\r\n# Rider/IntelliJ\r\n.idea/\r\n\r\n# Gemini\r\n.gemini/\r\n\r\n# Claude Code\r\n.claude/\r\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "Changelog\r\n====\r\n\r\n### Next\r\n\r\n* Add `--sandbox` flag to `kaggle competitions submit` for sandbox submissions (competition hosts/admins only)\r\n\r\n### 2.0.0\r\n\r\n* General Availability release\r\n* Change more \"instance\" to \"variation\"\r\n* Update link for the integration test auth instructions (#926)\r\n* Fix string formatting in upgrade nudge message (#928) Thanks PythonicVarun!\r\n\r\n### 1.8.4\r\n\r\n* Rename `kaggle-api` to `kaggle-cli`\r\n* Allow auth to happen multiple times (#922)\r\n* Add --acc to set accelerator for: kaggle kernels push ... (#907)\r\n* Add automatic retry and resume to download_file (#905) Thanks katoue!\r\n* Restore model validation check (#902)\r\n* Add file pattern matching in output download (#901) Thanks piotr-ginal!\r\n\r\n### 1.8.3\r\n\r\n* Add packaging dep (#883)\r\n* Add version checking against server known-version (#880)\r\n* Fix edit error (#876)\r\n* Use kagglesdk from pypi (#875)\r\n* Fix Kaggle access token auth KeyError when KAGGLE_API_TOKEN is unset (#874)\r\n\r\n### 1.8.2\r\n\r\n* Changes to build script\r\n\r\n### 1.8.1\r\n\r\n* Fix memory exhaustion when downloading large files (#869)\r\n* Add python-dateutil to pyproject.toml dependencies (#866)\r\n\r\n### 1.8.0\r\n\r\n* Fix resumable download error (#865)\r\n* Fix dataset version spec (#862)\r\n* Add machine_shape to the metadata of kaggle kernels pull (#856)\r\n* Add pagination options to models\r\n* Add pagination options for submissions (#832)\r\n* Add pagination options to list commands (#815)\r\n* Add canonical aliases for push/pull (#787)\r\n* Add parquet as a filter option (#786)\r\n* Add variations as alt for instances (#784)\r\n* Enable (and rename) synonyms i and v (#782)\r\n\r\n### 1.7.5.0 (not released)\r\n\r\n* Require Python 3.11.\r\n* Add KernelExecutionType (#775)\r\n* Output docker_image as part of the pull metadata (#773)\r\n* Allow user to specify docker_image during kernel push (#774)\r\n* Add kernel version type to save request (#771)\r\n* Add tests for delete and de-flake (#769)\r\n* Rename \"yes\" params and make confirmation consistent (#765)\r\n* Fix bug that caused double serialization (#764)\r\n* Add kaggle kernels delete (#762)\r\n* Add test for dataset_delete() and make script more robust (#760)\r\n* Check dataset status before uploading (#759)\r\n* Add kaggle datasets delete (#755)\r\n* Fix calls to download_file() (#752)\r\n* Add type annotations for mypy (#746)\r\n* Use Optional[...] in cases where the proto file does (#744)\r\n* Improve some type hints and fix a bug (#741)\r\n* Reformat everything with black (#737)\r\n* Add more type hints (#736)\r\n* Add type annotations to main file (#735)\r\n* Bulk reformat docstrings (#732)\r\n* Merge envars before sending a request (#729)\r\n* Use PROD if no environment is specified. (#726)\r\n* Add a no response action to auto-close issues (#723)\r\n\r\n### 1.7.4.2\r\n\r\n* Fix a problem in downloading kernel output files.\r\n\r\n### 1.7.4.1\r\n\r\n* Fix a dataset download problem. Datasets that had a license were failing to download.\r\n* Update the documentation to include code competition submit.\r\n\r\n### 1.7.4\r\n\r\nVersion 1.7.3 was never released. There were errors in versioning on\r\ntest.pypi.org. For consistency, we decided to jump several version numbers.\r\nThis is the first release since 1.6.17.\r\n\r\nThe actual changes are described in 1.7.3.\r\n\r\n### 1.7.3\r\n\r\nThere was an error in versioning. We went from 1.6.17 to 1.7.3.\r\n\r\n* Added the ability to submit to a code competition. Some required arguments have been made optional.\r\n* Added a `--timeout` option to `kaggle kernels push` to limit the run-time to the specified number of seconds.\r\n* Removed Swagger. Projects that use `kaggle/api/kaggle_api.py` may be affected. That file is deprecated and will be\r\n  removed. Most of its functions still work, but those that involve uploading files no longer work.\r\n  The command-line tool uses a higher-level abstraction for uploading, and client code needs\r\n  to be converted to use that.\r\n\r\n### 1.7.3b2\r\n\r\n* Added the ability to submit to a code competition. Some required arguments have been made optional.\r\n* Added a `--timeout` option to `kaggle kernels push` to limit the run-time to the specified number of seconds.\r\n\r\n### 1.7.3b1\r\n\r\n* Fix escaped-quote issue in HTTP requests.\r\n\r\n### 1.7.3b0\r\n\r\n* Remove Swagger. No user-visible changes to the command-line tool. However, projects that\r\nuse `kaggle/api/kaggle_api.py` may be affected. That file is deprecated and will be removed.\r\nMost of its functions still work, but those that involve uploading files no longer work.\r\nThe command-line tool uses a higher-level abstraction for uploading and client code needs \r\nto be converted to use that.\r\n\r\n### 1.6.17\r\n\r\n* No changes; release 1.6.16 did not complete.\r\n\r\n### 1.6.16\r\n\r\n* No changes; release 1.6.15 isn't usable. We're working on process updates to prevent this from happening again.\r\n\r\n### 1.6.15\r\n* Support XDG base directory specification on Linux\r\n* Disable out-of-date API version warning with -W\r\n* Allow an array of strings in \"source\" when uploading .ipynb files (thanks to GitHub user mgallifrey for the contribution!)\r\n* Add triton framework for models\r\n* Update model licenses\r\n\r\n### 1.6.14\r\n\r\n* No changes; release 1.6.13 isn't usable.\r\n\r\n### 1.6.13\r\n\r\n* Add --page-size and --page-token CLI options to all commands that display lists of files.\r\n\r\n### 1.6.12\r\n\r\n* Re-release 1.6.11 without the `src` directory included in the package.\r\n\r\n### 1.6.11\r\n\r\n* Allow unauthenticated usage of \"datasets download\", \"datasets files\".\r\n  * This will only work after April 8th, 2024. More more details, see:\r\n    <https://www.kaggle.com/discussions/product-feedback/485439>\r\n* Allow \"help\" and \"version\" to be used for all commands, unauthenticated.\r\n* Fix: \"dataset download -f\" can accept a specific dataset version.\r\n\r\n### 1.6.10\r\n\r\nRepackage of 1.6.8 as a new release, to fix the problematic 1.6.9 release.\r\n\r\n### 1.6.9\r\n\r\n* Do not use. Problematic release that causes an error:\r\n  `ModuleNotFoundError: No module named 'kaggle.api'`\r\n\r\n### 1.6.8\r\n\r\n* Add \"gguf\"\r\n\r\n### 1.6.7\r\n\r\n* Add \"TensorRtLlm\" model framework.\r\n\r\n### 1.6.6\r\n\r\n* Add \"GemmaCpp\" and \"GGML\" model frameworks.\r\n\r\n### 1.6.5\r\n\r\n* Add \"MaxText\" model framework.\r\n\r\n### 1.6.4\r\n\r\n* Add \"Transformers\" model framework.\r\n\r\n### 1.6.3\r\n\r\nRelease date: 01/11/24\r\n* Add \"Flax\" and \"Pax\" model frameworks.\r\n\r\n### 1.6.2\r\n\r\nRelease date: 01/09/24\r\n* Add \"Other\" model framework.\r\n\r\n### 1.6.1\r\nRelease date: 01/08/24\r\n* Fix dataset/model upload.\r\n\r\n### 1.6.0\r\nRelease date: 01/04/24\r\n* Release the pre-release branch with models endpoints.\r\n\r\n#### 1.6.0a7\r\nRelease date: 11/22/23\r\n* Add model_instance_type and base_model_instance_id to ModelInstance\r\n\r\n#### 1.6.0a6\r\nRelease date: 9/19/23\r\n* Include version_number and version_id in the model-instance-metadata.json file\r\n\r\n#### 1.6.0a5\r\nRelease date: 8/02/23\r\n* Add Keras model framework.\r\n\r\n#### 1.5.16\r\nRelease date: 7/17/23\r\n* Fix dataset download bug with locale\r\n* Resumable uploads\r\n* Retry some failed requests\r\n\r\n#### 1.6.0a4\r\nRelease date: 7/07/23\r\n* Resumable uploads\r\n* Retry some failed requests\r\n* Flag `-y` to delete model/instance/version without confirmation\r\n\r\n#### 1.6.0a3\r\nRelease date: 7/06/23\r\n* Confirmation for deleting a model, instance or version\r\n* Merge changes from 1.5.14 and 1.5.15\r\n\r\n#### 1.5.15\r\nRelease date: 6/30/23\r\n* Add missing licenses for datasets\r\n* Re-add option to pass dataset with `-d`\r\n* Download / list files for a specific version of a dataset\r\n* Documentation improvements\r\n\r\n#### 1.5.14\r\nRelease date: 6/29/23\r\n* Show the full error message from the API\r\n* Improve and fix documentation\r\n* Fix kernel's data sources bug, and add the model data source to push/pull\r\n* Implement resumable downloads\r\n* Fix unreachable code bug\r\n* Make some arguments required\r\n* Add enable_tpu to kernel's push/pull\r\n\r\n#### 1.6.0a2\r\nRelease date: 6/12/23\r\n* Add endpoint to get a modelInstance\r\n* Simplify the modelInstanceVersion creation\r\n* Fix Model files zipping\r\n\r\n#### 1.6.0a0\r\nRelease date: 6/07/23\r\n* Add Models endpoints\r\n\r\n#### 1.5.13\r\nRelease date: 2/27/23\r\n* Add ability to add a model to a kernel\r\n\r\n### 1.5.12\r\nRelease date: 03/12/21\r\n* No changes\r\n\r\n### 1.5.11\r\nRelease date: 03/12/21\r\n* Add support for non-ASCII characters for kernels.\r\n\r\n### 1.5.10\r\nRelease date: 11/30/20\r\n* Remove dependency on slugify.\r\n\r\n### 1.5.9\r\nRelease date: 10/21/20\r\n* Drop version restriction on urllib3 in setup.py.\r\n\r\n### 1.5.8\r\nRelease date: 09/03/20\r\n* No user-facing changes\r\n\r\n#### 1.5.7\r\nRelease date: 8/31/20\r\n* Add ability to specify the kernel docker image pinning type\r\n* Kernels have internet enabled by default\r\n* Various competitions fixes\r\n\r\n#### 1.5.6\r\nRelease date: 9/19/19\r\n* Downloading all files for a competition downloads a zip instead of individual files\r\n\r\n#### 1.5.5\r\nRelease date: 8/30/19\r\n* Add vote count and usability rating to datasets listing\r\n* Add min and max dataset size filters to datasets listing\r\n* Add additional information to dataset metadata API\r\n* Allow updating dataset metdata\r\n\r\n#### 1.5.4\r\nRelease date: 5/28/19\r\n* Make kernels init more friendly\r\n* Make directories if needed for kernels output\r\n\r\n#### 1.5.3\r\nRelease date: 2/20/19\r\n* Bump urllib3 version\r\n\r\n#### 1.5.2\r\nRelease date: 1/28/19\r\n* Don't error on encoding errors when printing tables\r\n* Exit with error code when an exception is caught\r\n\r\n#### 1.5.1.1\r\nRelease date: 12/5/18\r\n* Add missing cli option for dataset subfolders\r\n\r\n#### 1.5.1\r\nRelease date: 12/5/18\r\n* Allow custom ca_cert files\r\n* Support uplodaing datasets with subfolders\r\n* Fix kaggle.json permissions warning\r\n\r\n#### 1.5.0\r\nRelease date: 10/19/18\r\n* Update API to work with new competitions submissions backend.  This change will force old API clients to update.\r\n* Update error message when config file is not found.\r\n\r\n#### 1.4.7.1\r\nRelease date: 8/28/18\r\n* Fix host\r\n\r\n#### 1.4.7\r\nRelease date: 8/28/18\r\n* Make dataset version `-p` argument actually optinal\r\n* Don't require the `resources` field when updating a dataset\r\n* Don't automatically unzip datasets\r\n* Add an unzip option for dataset downloads\r\n* Add validation for kernel title and slug length\r\n* Give a warning if kernel title does not resolve to the specified slug\r\n* Show kernel version number after pushing\r\n* Respect `code_file` value in kernel metadata when pulling kernels\r\n\r\n#### 1.4.6\r\nRelease date: 8/7/18\r\n* Allow setting config values through environmental variables\r\n\r\n#### 1.4.5\r\nRelease date: 8/1/18\r\n* Add error if dataset metadata repeats files\r\n\r\n#### 1.4.4\r\nRelease date: 7/30/18\r\n* Fix issue with reading kernel metadata\r\n\r\n#### 1.4.3\r\nRelease date: 7/30/18\r\n* Add more competitions list options\r\n* Add more datasets list options\r\n* Add a couple more fields to kernels list display\r\n* Add support for kernel and dataset ID's\r\n* Allow generating metadata for an existing dataset\r\n* Fix issue with downloading from datasets whose titles don't match their slugs\r\n* Use kernel slug as filename for kernel output\r\n* Make upload and download directory default to current working directory\r\n* Use a default username on downloading kernel or dataset data if none is specified\r\n* Support extended data types on datasets\r\n* Stop requiring `-c`, `-d`, and `-k` arguments\r\n* Don't require `resources` field in dataset metadata\r\n\r\n#### 1.4.2\r\nRelease date: 7/20/18\r\n* Validate dataset slug and title length before uploading\r\n* Fix issue with dataset metadata file detection\r\n* Cleaned up KeyboardInterrupt errors\r\n* Validate all specified files in a dataset exist prior to uploading\r\n* Make ApiExceptions (slightly) less ugly\r\n\r\n#### 1.4.1\r\nRelease date: 7/20/18\r\n* Add python 3.7 compatibility\r\n\r\n#### 1.4.0\r\nRelease date: 7/19/18\r\n* Add kernels support\r\n** List and search kernels\r\n** Push kernels code\r\n** Pull kernels code\r\n** Download kernel output\r\n** Get latest kernel run status\r\n\r\n#### 1.3.12\r\nRelease date: 6/25/18\r\n* Allow setting a `'KAGGLE_CONFIG_DIR'` environmental token\r\n* Return metadata file after creating\r\n* Alert users that dataset creation takes time\r\n\r\n#### 1.3.11.1\r\n* Fix other invalid tags check\r\n\r\n#### 1.3.11\r\nRelease date: 6/12/18\r\n* Improve version check\r\n* Fix invalid tags check\r\n\r\n#### 1.3.10\r\nRelease date: 6/10/18\r\n* Restrict urllib3's version due to requests dependency problem\r\n\r\n#### 1.3.9.1\r\nRelease date: 6/9/18\r\n* Fix bug with competitions submissions.\r\n\r\n#### 1.3.9\r\nRelease date: 6/8/18\r\n* Improve error message for closed competitions\r\n* Remove stacktrace on errors\r\n* Print any invalid tags\r\n* Warn if there are no competition files to download\r\n* Implement resumable uploads\r\n* Add subtitle metadata to dataset uploads\r\n* Add progress bars for uploads and downloads\r\n* Add command for downloading competitions leaderboard\r\n* Add command for viewing the top of the leaderboard\r\n\r\n#### 1.3.8\r\nRelease date: 5/18/18\r\n* Add option to delete all previous dataset versions\r\n\r\n#### 1.3.7\r\nRelease date: 5/18/18\r\n* Add aliases for subcommands (ex. `kaggle c` is the same thing as `kaggle competitions`)\r\n* Add version command\r\n* Show full download path for files\r\n* Remove file size limitation from uploads\r\n\r\n#### 1.3.6\r\nRelease date: 5/7/18\r\n* Give the option to add tags to datasets.\r\n  * Known limitiation - you cannot delete tags through the API.  Those changes must be done through the website.\r\n\r\n#### 1.3.5\r\nRelease date: 5/4/18\r\n* Fix schema declaration in dataset resources\r\n\r\n#### 1.3.4\r\nRelease date: 4/30/18\r\n* Rename `columns` to `fields`\r\n\r\n#### 1.3.3\r\nRelease date: 4/26/18\r\n* Fix UnicodeEncodeError for certain datasets\r\n* Include Swagger yaml and config files\r\n\r\n#### 1.3.2.1\r\nRelease date: 4/24/18\r\n* Fix bug with column metadata\r\n\r\n#### 1.3.2\r\nRelease date: 4/24/18\r\n* Give the option to specify a schema for uploaded datasets\r\n* Give the option to set the dataset description during updates\r\n\r\n#### 1.3.1\r\nRelease date: 4/19/18\r\n* Give the option to set dataset file descriptions\r\n* Give the option to not convert tabular datasets to csv\r\n\r\n#### 1.3.0\r\nRelease date: 4/18/18\r\n\r\n* Give the option to set the dataset description during creation\r\n\r\n#### 1.2.1\r\nRelease date: 4/17/18\r\n\r\n* [Issue #5](https://github.com/Kaggle/kaggle-api/issues/5) -  Reformat code for consistency and to align with [Google's python coding style](https://google.github.io/styleguide/pyguide.html).  Most of the changes are cosmetic, but most cases of `camelCasing` other than class names have been changed to `snake_case`.  This is a breaking change for anyone directly using the python code rather than simply using the command line.\r\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# How to Contribute\r\n\r\nWe'd love to accept your patches and contributions to this project. There are\r\njust a few small guidelines you need to follow.\r\n\r\n## Contributor License Agreement\r\n\r\nContributions to this project must be accompanied by a Contributor License\r\nAgreement. You (or your employer) retain the copyright to your contribution;\r\nthis simply gives us permission to use and redistribute your contributions as\r\npart of the project. Head over to <https://cla.developers.google.com/> to see\r\nyour current agreements on file or to sign a new one.\r\n\r\nYou generally only need to submit a CLA once, so if you've already submitted one\r\n(even if it was for a different project), you probably don't need to do it\r\nagain.\r\n\r\n## Code reviews\r\n\r\nAll submissions, including submissions by project members, require review. We\r\nuse GitHub pull requests for this purpose. Consult\r\n[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more\r\ninformation on using pull requests.\r\n\r\n## Community Guidelines\r\n\r\nThis project follows [Google's Open Source Community\r\nGuidelines](https://opensource.google.com/conduct/)."
  },
  {
    "path": "Dockerfile",
    "content": "ARG PYTHON_VERSION\n\nFROM python:${PYTHON_VERSION}\n\nRUN pip install hatch==1.14.0\n\n# Add only the minimal files required to be able to pre-create the hatch environments.\n# If any of these files changes, a new Docker build is necessary. This is why we need\n# to only include the minimal set of files.\nADD pyproject.toml /working/pyproject.toml\nADD LICENSE.txt /working/LICENSE.txt\nADD README.md /working/README.md\nADD src/kaggle/__init__.py /working/src/kaggle/__init__.py\nWORKDIR /working\n\n# Pre-create the hatch environments.\n# This drastically cut the time to run commands with the `docker-hatch` wrapper\n#  since the creation of the environments (including syncing dependencies) is\n# only done once when building this image and is skipped later.\nRUN hatch env create default\nRUN hatch env create lint\n\nENTRYPOINT [\"hatch\"]\n"
  },
  {
    "path": "GEMINI.md",
    "content": "# Coworker Relationship\n- We are a team. Your success is my success.\n- I'm your boss, but we're informal.\n- We both have valuable, complementary experience.\n- It's okay to admit when we don't know something.\n- Push back with evidence.\n\n# Coding Standards\n- Use simple, clean, and maintainable solutions.\n- Make the smallest reasonable changes. Ask for permission before rewriting.\n- Match the existing code style.\n- Stay on task. Create issues for unrelated fixes.\n- Don't remove comments unless they are false.\n- Use evergreen comments.\n- No mock implementations.\n- Do not rewrite code to fix a bug without permission.\n- Use evergreen naming conventions.\n\n# Documentation\n- Store documentation in the `documentation` directory.\n- Use Markdown and create an index named `intro.md` with links.\n- Document all commands, sub-commands, and options with examples.\n\n# Anlyzing Python Code\n- When analyzing Python code, use the `api` module to parse it, UNLESS instructed otherwise.\n- Use `api.get_docstring()` to locate a docstring for an item.\n- To find type hints, walk the AST using `api.walk_tree()` looking for type parameters with `ast.TypeVar()`, `ast.ParamSpec()`, and `ast.TypeVarTuple()`.\n\n# Getting Help\n- Ask for clarification.\n- Ask for help when needed.\n\n# Testing\n- Tests must cover the implemented functionality.\n- Pay attention to logs and test output.\n- Test output must be pristine.\n- Test for expected errors.\n- Practice TDD:\n    1. Write a failing test.\n    2. Write the minimum code to pass the test.\n    3. Refactor.\n    4. Repeat.\n\n# Specific Technologies\n- @~/.gemini/docs/python.md"
  },
  {
    "path": "LICENSE.txt",
    "content": "                                 Apache License\r\n                           Version 2.0, January 2004\r\n                        http://www.apache.org/licenses/\r\n\r\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\r\n\r\n   1. Definitions.\r\n\r\n      \"License\" shall mean the terms and conditions for use, reproduction,\r\n      and distribution as defined by Sections 1 through 9 of this document.\r\n\r\n      \"Licensor\" shall mean the copyright owner or entity authorized by\r\n      the copyright owner that is granting the License.\r\n\r\n      \"Legal Entity\" shall mean the union of the acting entity and all\r\n      other entities that control, are controlled by, or are under common\r\n      control with that entity. For the purposes of this definition,\r\n      \"control\" means (i) the power, direct or indirect, to cause the\r\n      direction or management of such entity, whether by contract or\r\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\r\n      outstanding shares, or (iii) beneficial ownership of such entity.\r\n\r\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\r\n      exercising permissions granted by this License.\r\n\r\n      \"Source\" form shall mean the preferred form for making modifications,\r\n      including but not limited to software source code, documentation\r\n      source, and configuration files.\r\n\r\n      \"Object\" form shall mean any form resulting from mechanical\r\n      transformation or translation of a Source form, including but\r\n      not limited to compiled object code, generated documentation,\r\n      and conversions to other media types.\r\n\r\n      \"Work\" shall mean the work of authorship, whether in Source or\r\n      Object form, made available under the License, as indicated by a\r\n      copyright notice that is included in or attached to the work\r\n      (an example is provided in the Appendix below).\r\n\r\n      \"Derivative Works\" shall mean any work, whether in Source or Object\r\n      form, that is based on (or derived from) the Work and for which the\r\n      editorial revisions, annotations, elaborations, or other modifications\r\n      represent, as a whole, an original work of authorship. For the purposes\r\n      of this License, Derivative Works shall not include works that remain\r\n      separable from, or merely link (or bind by name) to the interfaces of,\r\n      the Work and Derivative Works thereof.\r\n\r\n      \"Contribution\" shall mean any work of authorship, including\r\n      the original version of the Work and any modifications or additions\r\n      to that Work or Derivative Works thereof, that is intentionally\r\n      submitted to Licensor for inclusion in the Work by the copyright owner\r\n      or by an individual or Legal Entity authorized to submit on behalf of\r\n      the copyright owner. For the purposes of this definition, \"submitted\"\r\n      means any form of electronic, verbal, or written communication sent\r\n      to the Licensor or its representatives, including but not limited to\r\n      communication on electronic mailing lists, source code control systems,\r\n      and issue tracking systems that are managed by, or on behalf of, the\r\n      Licensor for the purpose of discussing and improving the Work, but\r\n      excluding communication that is conspicuously marked or otherwise\r\n      designated in writing by the copyright owner as \"Not a Contribution.\"\r\n\r\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\r\n      on behalf of whom a Contribution has been received by Licensor and\r\n      subsequently incorporated within the Work.\r\n\r\n   2. Grant of Copyright License. Subject to the terms and conditions of\r\n      this License, each Contributor hereby grants to You a perpetual,\r\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r\n      copyright license to reproduce, prepare Derivative Works of,\r\n      publicly display, publicly perform, sublicense, and distribute the\r\n      Work and such Derivative Works in Source or Object form.\r\n\r\n   3. Grant of Patent License. Subject to the terms and conditions of\r\n      this License, each Contributor hereby grants to You a perpetual,\r\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r\n      (except as stated in this section) patent license to make, have made,\r\n      use, offer to sell, sell, import, and otherwise transfer the Work,\r\n      where such license applies only to those patent claims licensable\r\n      by such Contributor that are necessarily infringed by their\r\n      Contribution(s) alone or by combination of their Contribution(s)\r\n      with the Work to which such Contribution(s) was submitted. If You\r\n      institute patent litigation against any entity (including a\r\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\r\n      or a Contribution incorporated within the Work constitutes direct\r\n      or contributory patent infringement, then any patent licenses\r\n      granted to You under this License for that Work shall terminate\r\n      as of the date such litigation is filed.\r\n\r\n   4. Redistribution. You may reproduce and distribute copies of the\r\n      Work or Derivative Works thereof in any medium, with or without\r\n      modifications, and in Source or Object form, provided that You\r\n      meet the following conditions:\r\n\r\n      (a) You must give any other recipients of the Work or\r\n          Derivative Works a copy of this License; and\r\n\r\n      (b) You must cause any modified files to carry prominent notices\r\n          stating that You changed the files; and\r\n\r\n      (c) You must retain, in the Source form of any Derivative Works\r\n          that You distribute, all copyright, patent, trademark, and\r\n          attribution notices from the Source form of the Work,\r\n          excluding those notices that do not pertain to any part of\r\n          the Derivative Works; and\r\n\r\n      (d) If the Work includes a \"NOTICE\" text file as part of its\r\n          distribution, then any Derivative Works that You distribute must\r\n          include a readable copy of the attribution notices contained\r\n          within such NOTICE file, excluding those notices that do not\r\n          pertain to any part of the Derivative Works, in at least one\r\n          of the following places: within a NOTICE text file distributed\r\n          as part of the Derivative Works; within the Source form or\r\n          documentation, if provided along with the Derivative Works; or,\r\n          within a display generated by the Derivative Works, if and\r\n          wherever such third-party notices normally appear. The contents\r\n          of the NOTICE file are for informational purposes only and\r\n          do not modify the License. You may add Your own attribution\r\n          notices within Derivative Works that You distribute, alongside\r\n          or as an addendum to the NOTICE text from the Work, provided\r\n          that such additional attribution notices cannot be construed\r\n          as modifying the License.\r\n\r\n      You may add Your own copyright statement to Your modifications and\r\n      may provide additional or different license terms and conditions\r\n      for use, reproduction, or distribution of Your modifications, or\r\n      for any such Derivative Works as a whole, provided Your use,\r\n      reproduction, and distribution of the Work otherwise complies with\r\n      the conditions stated in this License.\r\n\r\n   5. Submission of Contributions. Unless You explicitly state otherwise,\r\n      any Contribution intentionally submitted for inclusion in the Work\r\n      by You to the Licensor shall be under the terms and conditions of\r\n      this License, without any additional terms or conditions.\r\n      Notwithstanding the above, nothing herein shall supersede or modify\r\n      the terms of any separate license agreement you may have executed\r\n      with Licensor regarding such Contributions.\r\n\r\n   6. Trademarks. This License does not grant permission to use the trade\r\n      names, trademarks, service marks, or product names of the Licensor,\r\n      except as required for reasonable and customary use in describing the\r\n      origin of the Work and reproducing the content of the NOTICE file.\r\n\r\n   7. Disclaimer of Warranty. Unless required by applicable law or\r\n      agreed to in writing, Licensor provides the Work (and each\r\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\r\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\r\n      implied, including, without limitation, any warranties or conditions\r\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\r\n      PARTICULAR PURPOSE. You are solely responsible for determining the\r\n      appropriateness of using or redistributing the Work and assume any\r\n      risks associated with Your exercise of permissions under this License.\r\n\r\n   8. Limitation of Liability. In no event and under no legal theory,\r\n      whether in tort (including negligence), contract, or otherwise,\r\n      unless required by applicable law (such as deliberate and grossly\r\n      negligent acts) or agreed to in writing, shall any Contributor be\r\n      liable to You for damages, including any direct, indirect, special,\r\n      incidental, or consequential damages of any character arising as a\r\n      result of this License or out of the use or inability to use the\r\n      Work (including but not limited to damages for loss of goodwill,\r\n      work stoppage, computer failure or malfunction, or any and all\r\n      other commercial damages or losses), even if such Contributor\r\n      has been advised of the possibility of such damages.\r\n\r\n   9. Accepting Warranty or Additional Liability. While redistributing\r\n      the Work or Derivative Works thereof, You may choose to offer,\r\n      and charge a fee for, acceptance of support, warranty, indemnity,\r\n      or other liability obligations and/or rights consistent with this\r\n      License. However, in accepting such obligations, You may act only\r\n      on Your own behalf and on Your sole responsibility, not on behalf\r\n      of any other Contributor, and only if You agree to indemnify,\r\n      defend, and hold each Contributor harmless for any liability\r\n      incurred by, or claims asserted against, such Contributor by reason\r\n      of your accepting any such warranty or additional liability.\r\n\r\n   END OF TERMS AND CONDITIONS\r\n\r\n   APPENDIX: How to apply the Apache License to your work.\r\n\r\n      To apply the Apache License to your work, attach the following\r\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\r\n      replaced with your own identifying information. (Don't include\r\n      the brackets!)  The text should be enclosed in the appropriate\r\n      comment syntax for the file format. We also recommend that a\r\n      file or class name and description of purpose be included on the\r\n      same \"printed page\" as the copyright notice for easier\r\n      identification within third-party archives.\r\n\r\n   Copyright 2018 Kaggle Inc\r\n\r\n   Licensed under the Apache License, Version 2.0 (the \"License\");\r\n   you may not use this file except in compliance with the License.\r\n   You may obtain a copy of the License at\r\n\r\n       http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n   Unless required by applicable law or agreed to in writing, software\r\n   distributed under the License is distributed on an \"AS IS\" BASIS,\r\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n   See the License for the specific language governing permissions and\r\n   limitations under the License.\r\n"
  },
  {
    "path": "README.md",
    "content": "# Kaggle CLI\r\n\r\nThe official CLI to interact with [Kaggle](https://www.kaggle.com).\r\n\r\n---\r\n\r\n[User documentation](docs/README.md)\r\n\r\n---\r\n\r\n## Key Features\r\n\r\nSome of the key features are:\r\n\r\n* List competitions, download competition data, submit to a competition.\r\n* List, create, update, download or delete datasets.\r\n* List, create, update, download or delete models & model variations.\r\n* List, update & run, download code & output or delete kernels (notebooks).\r\n\r\n## Installation\r\n\r\nInstall the `kaggle` package with [pip](https://pypi.org/project/pip/):\r\n\r\n```sh\r\npip install kaggle\r\n```\r\n\r\nAdditional installation instructions can be found [here](docs/README.md#installation).\r\n\r\n## Quick start\r\n\r\nExplore the available commands by running:\r\n\r\n```sh\r\nkaggle --help\r\n```\r\n\r\nSee the [User documentation](docs/README.md) for more examples & tutorials.\r\n\r\n## Development\r\n\r\n### Prerequisites\r\n\r\nWe use [hatch](https://hatch.pypa.io) to manage this project.\r\n\r\nFollow these [instructions](https://hatch.pypa.io/latest/install/) to install it.\r\n\r\n### Run `kaggle` from source\r\n\r\n#### Option 1: Execute a one-liner of code from the command line\r\n\r\n```sh\r\nhatch run kaggle datasets list\r\n```\r\n\r\n#### Option 2: Run many commands in a shell\r\n\r\n```sh\r\nhatch shell\r\n\r\n# Inside the shell, you can run many commands\r\nkaggle datasets list\r\nkaggle competitions list\r\n...\r\n```\r\n\r\n### Lint / Format\r\n\r\n```sh\r\n# Lint check\r\nhatch run lint:style\r\nhatch run lint:typing\r\nhatch run lint:all     # for both\r\n\r\n# Format\r\nhatch run lint:fmt\r\n```\r\n\r\n### Tests\r\n\r\nNote: These tests are not true unit tests and are calling the Kaggle web server.\r\n\r\n```sh\r\n# Run against kaggle.com\r\nhatch run test:prod\r\n\r\n# Run against a local web server (Kaggle engineers only)\r\nhatch run test:local\r\n```\r\n\r\n### Integration Tests\r\n\r\nTo run integration tests on your local machine, you need to set up your Kaggle credentials. You can do this by following the [authentication instructions](docs/README.md#authentication).\r\n\r\nAfter setting up your credentials, you can run the integration tests as follows:\r\n\r\n```sh\r\nhatch run test:integration\r\n```\r\n\r\n### Running `hatch` commands inside Docker\r\n\r\nThis is useful to run in a consistent environment and easily switch between Python versions.\r\n\r\nThe following shows how to run `hatch run lint:all` but this also works for any other hatch commands:\r\n\r\n```\r\n# Use default Python version\r\n./docker-hatch run lint:all\r\n```\r\n\r\n## Changelog\r\n\r\nSee [CHANGELOG](CHANGELOG.md).\r\n\r\n## Contributing\r\n\r\nSee [CONTRIBUTING.md](CONTRIBUTING.md).\r\n\r\n## License\r\n\r\nThe Kaggle CLI is released under the [Apache 2.0 license](LICENSE.txt).\r\n"
  },
  {
    "path": "SECURITY.md",
    "content": "# Security Policy\n\n## Supported Versions\n\nSecurity updates are applied only to the latest release.\n\n## Reporting a Vulnerability\n\nIf you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.** This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released.\n\nPlease disclose it at [security advisory](https://github.com/Kaggle/kaggle-cli/security/advisories/new).\n\nThe vulnerabilities will be addressed as soon as possible, with a maximum of 90 days before a public exposure.\n"
  },
  {
    "path": "docker-hatch",
    "content": "#!/bin/bash\nset -e\n\nPYTHON_VERSION='3.11.6' # Default Python version to use.\nCACHE_FLAG=''\n\nusage() {\ncat << EOF\nUsage: $0 [OPTIONS] HATCH-OPTIONS-COMMAND-ARGS\nRun the given HATCH-OPTIONS-COMMAND-ARGS in a container.\n\nOptions:\n    -h, --help                              Show documentation on how to use $0\n    -v, --python-version PYTHON-VERSION     Run in a container using this specfic Python version.\n                                            Valid versions are tags of the \\`python\\` Docker image: https://hub.docker.com/_/python\n    -f, --force-rebuild-docker-image        Force re-build the Docker image.\nEOF\n}\n\nwhile :; do\n    case \"$1\" in \n        -h|--help)\n            usage\n            exit\n            ;;        \n        -v|--python-version)\n            if [[ -z $2 ]]; then\n                usage\n                printf 'ERROR: No PYTHON-VERSION specified after the %s flag.\\n' \"$1\" >&2\n                exit\n            fi\n            PYTHON_VERSION=$2\n            shift # skip the flag value\n            ;;\n        -f|--force-rebuild-docker-image)\n            CACHE_FLAG='--no-cache'\n            ;;\n        # Use this marker to indicate that the rest of the command is for hatch\n        --)\n            shift # skip this one to pass the rest to hatch  \n            break\n            ;;\n        -?*)\n            usage\n            printf 'ERROR: Unknown option: %s\\n' \"$1\" >&2\n            exit\n            ;;\n        *)            \n            break\n    esac\n\n    shift\ndone\n\nDOCKER_IMAGE=\"kaggle-cli-docker-hatch:${PYTHON_VERSION}\"\n\nreadonly PYTHON_VERSION\nreadonly DOCKER_IMAGE\nreadonly CACHE_FLAG\n\necho \"Running 'hatch $@' inside a Docker container using Python ${PYTHON_VERSION}\"\n\ndocker build -f Dockerfile \\\n    -t ${DOCKER_IMAGE} \\\n    ${CACHE_FLAG} \\\n    --cache-from ${DOCKER_IMAGE} \\\n    --build-arg PYTHON_VERSION=${PYTHON_VERSION} \\\n    --quiet \\\n    .\n\nset -x\ndocker run -it --rm -v $PWD:/working -v ~/.kaggle:/root/.kaggle -w /working ${DOCKER_IMAGE} \"$@\"\n"
  },
  {
    "path": "docs/Makefile",
    "content": "# Minimal makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line, and also\n# from the environment for the first two.\nSPHINXOPTS    ?=\nSPHINXBUILD   ?= sphinx-build\nSOURCEDIR     = .\nBUILDDIR      = _build\nSPHINX_APIDOC_OPTIONS=members,show-inheritance\n\n# Put it first so that \"make\" without argument is like \"make help\".\nhelp:\n\t@$(SPHINXBUILD) -M help \"$(SOURCEDIR)\" \"$(BUILDDIR)\" $(SPHINXOPTS) $(O)\n\n.PHONY: help Makefile\n\n# Catch-all target: route all unknown targets to Sphinx using the new\n# \"make mode\" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).\n%: Makefile\n\t@$(SPHINXBUILD) -M $@ \"$(SOURCEDIR)\" \"$(BUILDDIR)\" $(SPHINXOPTS) $(O)\n\ncleaner: Makefile\n\trm -rf _build source\n"
  },
  {
    "path": "docs/README.md",
    "content": "# Kaggle CLI Documentation\n\nWelcome to the Kaggle CLI documentation. This guide provides detailed information on how to use the Kaggle command-line interface to interact with Kaggle's platform.\n\n## Installation\n\nNote: Ensure you have Python 3.11+ and the package manager `pip` installed.\n\nInstall the `kaggle` package with [pip](https://pypi.org/project/pip/):\n\n```sh\npip install kaggle\n```\n\nIf you run into a `Command kaggle not found` error, ensure that your Python executable scripts are in your $PATH. For a local user install on Linux, the default location is `~/.local/bin`. On Windows, the default location is `$PYTHON_HOME/Scripts`.\n\n## Authentication\n\nFirst, you will need a Kaggle account. You can sign up [here](https://www.kaggle.com/account/login).\n\nAfter login, you can download your Kaggle API credentials at https://www.kaggle.com/settings by clicking on the \"Generate New Token\" button under the \"API\" section.\n\n### Option 1: Environment variable\n\n```sh\nexport KAGGLE_API_TOKEN=xxxxxxxxxxxxxx # Copied from the settings UI\n```\n\n### Option 2: API token file\n\nStore your Kaggle API token obtained from your [Kaggle account settings page](https://www.kaggle.com/settings) in a file at `~/.kaggle/access_token`.\n\n### Option 3: Legacy API credentials file\n\nFrom your [Kaggle account settings page](https://www.kaggle.com/settings), under \"Legacy API Credentials\", click on the \"Create Legacy API Key\" button to generate a `kaggle.json` file and store it at `~/.kaggle/kaggle.json`.\n\n## CLI Usage\n\nRun the following command to list the available commands:\n\n```sh\nkaggle --help\n```\n\nThe Kaggle CLI is organized into several command groups:\n\n*   [Competitions](./competitions.md): Manage and participate in Kaggle competitions.\n*   [Datasets](./datasets.md): Search, download, and manage Kaggle datasets.\n*   [Kernels](./kernels.md): Interact with Kaggle Kernels (notebooks and scripts).\n*   [Models](./models.md): Manage your Kaggle Models.\n*   [Model Variations](./model_variations.md): Manage variations of your Kaggle Models.\n*   [Model Variation Versions](./model_variations_versions.md): Manage versions of your Kaggle Model Variations.\n*   [Configuration](./configuration.md): Configure the Kaggle CLI.\n\n## Tutorials\n\nExplore these tutorials to learn how to perform common tasks:\n\n*   [Tutorials](./tutorials.md)\n    *   [Create a Dataset](./tutorials.md#tutorial-create-a-dataset)\n    *   [Find and Download a Dataset](./tutorials.md#tutorial-find-and-download-a-dataset)\n    *   [Create a Model](./tutorials.md#tutorial-create-a-model)\n    *   [Create a Model Variation](./tutorials.md#tutorial-create-a-model-variation)\n    *   [Create a Model Variation Version](./tutorials.md#tutorial-create-a-model-variation-version)\n    *   [How to Submit to a Competition](./tutorials.md#tutorial-how-to-submit-to-a-competition)\n    *   [How to Submit to a Code Competition](./tutorials.md#tutorial-how-to-submit-to-a-code-competition)"
  },
  {
    "path": "docs/competitions.md",
    "content": "# Competitions Commands\n\nCommands for interacting with Kaggle competitions.\n\nFor tutorials on how to submit to competitions :\n* [How to Submit to a Competition](./tutorials.md#tutorial-how-to-submit-to-a-competition)\n* [How to Submit to a Code Competition](./tutorials.md#tutorial-how-to-submit-to-a-code-competition)\n\n## `kaggle competitions list`\n\nLists available competitions.\n\n**Usage:**\n\n```bash\nkaggle competitions list [options]\n```\n\n**Options:**\n\n*   `--group <GROUP>`: Filter by competition group. Valid options: `general`, `entered`, `inClass`.\n*   `--category <CATEGORY>`: Filter by competition category. Valid options: `all`, `featured`, `research`, `recruitment`, `gettingStarted`, `masters`, `playground`.\n*   `--sort-by <SORT_BY>`: Sort results. Valid options: `grouped`, `prize`, `earliestDeadline`, `latestDeadline`, `numberOfTeams`, `recentlyCreated` (default: `latestDeadline`).\n*   `-p, --page <PAGE>`: Page number for results (default: 1).\n*   `-s, --search <SEARCH_TERM>`: Search term.\n*   `-v, --csv`: Print results in CSV format.\n\n**Example:**\n\nList featured competitions in the general group, sorted by prize:\n\n```bash\nkaggle competitions list --group general --category featured --sort-by prize\n```\n\n**Purpose:**\n\nThis command helps you discover new competitions or find specific ones based on various criteria.\n\n## `kaggle competitions files`\n\nLists files for a specific competition.\n\n**Usage:**\n\n```bash\nkaggle competitions files <COMPETITION> [options]\n```\n\n**Arguments:**\n\n*   `<COMPETITION>`: Competition URL suffix (e.g., `titanic`).\n\n**Options:**\n\n*   `-v, --csv`: Print results in CSV format.\n*   `-q, --quiet`: Suppress verbose output.\n*   `--page-token <PAGE_TOKEN>`: Page token for results paging.\n*   `--page-size <PAGE_SIZE>`: Number of items to show on a page (default: 20, max: 200).\n\n**Example:**\n\nList the first 3 files for the \"titanic\" competition in CSV format, quietly:\n\n```bash\nkaggle competitions files titanic --page-size=3 -v -q\n```\n\n**Purpose:**\n\nUse this command to see the data files available for a competition before downloading them.\n\n## `kaggle competitions download`\n\nDownloads competition files.\n\n**Usage:**\n\n```bash\nkaggle competitions download <COMPETITION> [options]\n```\n\n**Arguments:**\n\n*   `<COMPETITION>`: Competition URL suffix (e.g., `titanic`).\n\n**Options:**\n\n*   `-f, --file <FILE_NAME>`: Specific file to download (downloads all if not specified).\n*   `-p, --path <PATH>`: Folder to download files to (defaults to current directory).\n*   `-w, --wp`: Download files to the current working path (equivalent to `-p .`).\n*   `-o, --force`: Force download, overwriting existing files.\n*   `-q, --quiet`: Suppress verbose output.\n\n**Examples:**\n\n1.  Download all files for the \"titanic\" competition to the current directory, overwriting existing files, quietly:\n\n    ```bash\n    kaggle competitions download titanic -w -o -q\n    ```\n\n2.  Download the `test.csv` file from the \"titanic\" competition to a folder named `tost`:\n\n    ```bash\n    kaggle competitions download titanic -f test.csv -p tost\n    ```\n\n**Purpose:**\n\nThis command allows you to get the necessary data files for a competition onto your local machine.\n\n## `kaggle competitions submit`\n\nMakes a new submission to a competition.\n\n**Usage:**\n\n```bash\nkaggle competitions submit <COMPETITION> -f <FILE_NAME> -m <MESSAGE> [options]\n```\n\n**Arguments:**\n\n*   `<COMPETITION>`: Competition URL suffix (e.g., `house-prices-advanced-regression-techniques`).\n*   `-f, --file <FILE_NAME>`: The submission file.\n*   `-m, --message <MESSAGE>`: The submission message.\n\n**Options:**\n\n*   `-k, --kernel <KERNEL>`: Name of the kernel (notebook) to submit (for code competitions).\n*   `-v, --version <VERSION>`: Version of the kernel to submit (e.g. `2`).\n*   `-q, --quiet`: Suppress verbose output.\n*   `--sandbox`: Mark submission as a sandbox submission (competition hosts/admins only).\n\n**Example: Standard (not code) competition:**\n\nSubmit `sample_submission.csv` to the \"house-prices-advanced-regression-techniques\" competition with the message \"Test message\":\n\n```bash\nkaggle competitions submit house-prices-advanced-regression-techniques -f sample_submission.csv -m \"Test message\"\n```\n\n**Example: Code competition:**\n\nSubmit the `submission.csv` produced by version `3` of your `<YOUR_USERNAME>/rsna-submission` for the `rsna-2024-lumbar-spine-degenerative-classification` competition:\n\n```bash\nkaggle competitions submit rsna-2024-lumbar-spine-degenerative-classification -f submission.csv -k <YOUR_USERNAME>/rsna-submission -v 3 -m \"Test message\"\n```\n\n**Purpose:**\n\nUse this command to upload your predictions or code to a competition for scoring.\n\n## `kaggle competitions submissions`\n\nShows your past submissions for a competition.\n\n**Usage:**\n\n```bash\nkaggle competitions submissions <COMPETITION> [options]\n```\n\n**Arguments:**\n\n*   `<COMPETITION>`: Competition URL suffix (e.g., `house-prices-advanced-regression-techniques`).\n\n**Options:**\n\n*   `-v, --csv`: Print results in CSV format.\n*   `-q, --quiet`: Suppress verbose output.\n\n**Example:**\n\nShow submissions for \"house-prices-advanced-regression-techniques\" in CSV format, quietly:\n\n```bash\nkaggle competitions submissions house-prices-advanced-regression-techniques -v -q\n```\n\n**Purpose:**\n\nThis command allows you to review your previous submission attempts and their scores.\n\n## `kaggle competitions leaderboard`\n\nGets competition leaderboard information.\n\n**Usage:**\n\n```bash\nkaggle competitions leaderboard <COMPETITION> [options]\n```\n\n**Arguments:**\n\n*   `<COMPETITION>`: Competition URL suffix (e.g., `titanic`).\n\n**Options:**\n\n*   `-s, --show`: Show the top of the leaderboard in the console.\n*   `-d, --download`: Download the entire leaderboard to a CSV file.\n*   `-p, --path <PATH>`: Folder to download the leaderboard to (if `-d` is used).\n*   `-v, --csv`: Print results in CSV format (used with `-s`).\n*   `-q, --quiet`: Suppress verbose output.\n\n**Examples:**\n\n1.  Download the \"titanic\" leaderboard to a folder named `leaders`, quietly:\n\n    ```bash\n    kaggle competitions leaderboard titanic -d -p leaders -q\n    ```\n\n2.  Download the leaderboard and save it to `leaderboard.txt`:\n\n    ```bash\n    kaggle competitions leaderboard titanic > leaderboard.txt\n    ```\n\n**Purpose:**\n\nThis command lets you view your ranking and the scores of other participants in a competition.\n"
  },
  {
    "path": "docs/conf.py",
    "content": "# Configuration file for the Sphinx documentation builder.\n#\n# For the full list of built-in configuration values, see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Project information -----------------------------------------------------\n# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information\nimport sys\nfrom pathlib import Path\n\nsys.path.insert(0, str(Path(\"..\").resolve()))\n\n\ndef autodoc_skip_member(app, what, name, obj, skip, options):\n    # 'what' is the type of the object (e.g., 'function', 'class')\n    # 'name' is the name of the object (e.g., 'myfunction')\n    # 'obj' is the Python object itself\n    # 'skip' is a boolean indicating whether it's already marked to be skipped\n    # 'options' are the autodoc options\n\n    # Skip all CLI methods\n    if name.endswith(\"_cli\"):\n        # Param what should be 'method' but is 'class'; obj is the function object.\n        # https://github.com/sphinx-doc/sphinx/issues/6808\n        return True\n\n    return skip  # Return the original skip value for other members\n\n\ndef setup(app):\n    app.connect(\"autodoc-skip-member\", autodoc_skip_member)\n\n\nproject = \"kaggle-cli\"\ncopyright = \"2025, Kaggle\"\nauthor = \"Kaggle\"\n\n# -- General configuration ---------------------------------------------------\n# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration\n\nextensions = [\n    \"sphinx.ext.apidoc\",\n    \"sphinx.ext.autodoc\",\n    \"sphinx.ext.autosectionlabel\",\n    \"sphinx.ext.autosummary\",\n    \"sphinx.ext.napoleon\",\n    \"myst_parser\",\n]\n\ntemplates_path = [\"_templates\"]\nexclude_patterns = [\"_build\", \"Thumbs.db\", \".DS_Store\", \"**/kaggle/models/*.py\"]\n\nsource_suffix = {\n    \".rst\": \"restructuredtext\",\n    \".txt\": \"restructuredtext\",\n    \".md\": \"markdown\",\n}\n\n# -- Options for HTML output -------------------------------------------------\n# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output\n\nhtml_theme = \"alabaster\"\n\nautoclass_content = \"both\"\nmyst_heading_anchors = 2\nsuppress_warnings = [\"ref.unknown\"]\n\n# -- Options for sphinx.ext.apidoc -------------------------------------------\napidoc_module_dir = \"../src/kaggle\"\napidoc_output_dir = \"source\"\napidoc_excluded_paths = [\"api/kaggle_api.py\"]\napidoc_separate_modules = True\n"
  },
  {
    "path": "docs/configuration.md",
    "content": "# Kaggle CLI Configuration\n\nThe Kaggle CLI uses a configuration file to store settings such as your API credentials and default values for commands.\n\n## Configuration Commands\n\n### `config view`\n\nDisplays the current configuration values.\n\n**Usage:**\n\n```bash\nkaggle config view\n```\n\n**Purpose:**\n\nThis command allows you to inspect the current settings of your Kaggle CLI, such as the configured API endpoint, proxy settings, and default competition.\n\n### `config set`\n\nSets a specific configuration value.\n\n**Usage:**\n\n```bash\nkaggle config set -n <NAME> -v <VALUE>\n```\n\n**Arguments:**\n\n*   `-n, --name <NAME>`: The name of the configuration parameter to set. Valid options are `competition`, `path`, and `proxy`.\n*   `-v, --value <VALUE>`: The value to set for the configuration parameter.\n    *   For `competition`: The competition URL suffix (e.g., `titanic`).\n    *   For `path`: The default folder where files will be downloaded.\n    *   For `proxy`: The proxy server URL.\n\n**Example:**\n\nSet the default competition to \"titanic\":\n\n```bash\nkaggle config set -n competition -v titanic\n```\n\n**Purpose:**\n\nUse this command to customize the behavior of the Kaggle CLI, such as setting a default competition to avoid specifying it in every command, defining a default download path, or configuring a proxy server.\n\n### `config unset`\n\nClears a specific configuration value, reverting it to its default.\n\n**Usage:**\n\n```bash\nkaggle config unset -n <NAME>\n```\n\n**Arguments:**\n\n*   `-n, --name <NAME>`: The name of the configuration parameter to clear. Valid options are `competition`, `path`, and `proxy`.\n\n**Example:**\n\nClear the default competition:\n\n```bash\nkaggle config unset -n competition\n```\n\n**Purpose:**\n\nThis command removes a previously set configuration value, allowing the CLI to use its default behavior or prompt for the value if required.\n\n## Configuration File Location\n\nThe Kaggle CLI configuration is typically stored in a file named `kaggle.json` located in the `~/.kaggle/` directory on Linux and macOS, or `C:\\Users\\<Windows-username>\\.kaggle\\` on Windows.\n\nThis file contains your API username and key:\n\n```json\n{\"username\":\"YOUR_USERNAME\",\"key\":\"YOUR_API_KEY\"}\n```\n\nYou can download this file from your Kaggle account page (`https://www.kaggle.com/<YOUR_USERNAME>/account`) and place it in the correct directory.\n\nAlternatively, you can set the `KAGGLE_USERNAME` and `KAGGLE_KEY` environment variables.\n"
  },
  {
    "path": "docs/datasets.md",
    "content": "# Datasets Commands\n\nCommands for interacting with Kaggle datasets.\n\n## `kaggle datasets list`\n\nLists available datasets.\n\n**Usage:**\n\n```bash\nkaggle datasets list [options]\n```\n\n**Options:**\n\n*   `--sort-by <SORT_BY>`: Sort results. Valid options: `hottest`, `votes`, `updated`, `active` (default: `hottest`).\n*   `--size <SIZE_CATEGORY>`: DEPRECATED. Use `--min-size` and `--max-size`.\n*   `--file-type <FILE_TYPE>`: Filter by file type. Valid options: `all`, `csv`, `sqlite`, `json`, `bigQuery`.\n*   `--license <LICENSE_NAME>`: Filter by license. Valid options: `all`, `cc`, `gpl`, `odb`, `other`.\n*   `--tags <TAG_IDS>`: Filter by tags (comma-separated tag IDs).\n*   `-s, --search <SEARCH_TERM>`: Search term.\n*   `-m, --mine`: Display only your datasets.\n*   `--user <USER>`: Filter by a specific user or organization.\n*   `-p, --page <PAGE>`: Page number for results (default: 1).\n*   `-v, --csv`: Print results in CSV format.\n*   `--max-size <BYTES>`: Maximum dataset size in bytes.\n*   `--min-size <BYTES>`: Minimum dataset size in bytes.\n\n**Examples:**\n\n1.  List your own datasets:\n\n    ```bash\n    kaggle datasets list -m\n    ```\n\n2.  List CSV datasets, page 2, sorted by last updated, containing \"student\" in their title, with size between 13000 and 15000 bytes:\n\n    ```bash\n    kaggle datasets list --file-type csv --page 2 --sort-by updated -s student --min-size 13000 --max-size 15000\n    ```\n\n3.  List datasets with an ODB license, tagged with \"internet\", and matching the search term \"telco\":\n\n    ```bash\n    kaggle datasets list --license odb --tags internet --search telco\n    ```\n\n**Purpose:**\n\nThis command helps you find datasets on Kaggle based on various criteria like owner, file type, tags, and size.\n\n## `kaggle datasets files`\n\nLists files for a specific dataset.\n\n**Usage:**\n\n```bash\nkaggle datasets files <DATASET> [options]\n```\n\n**Arguments:**\n\n*   `<DATASET>`: Dataset URL suffix in the format `owner/dataset-name` (e.g., `kerneler/brazilian-bird-observation-metadata-from-wikiaves`).\n\n**Options:**\n\n*   `-v, --csv`: Print results in CSV format.\n*   `--page-token <PAGE_TOKEN>`: Page token for results paging.\n*   `--page-size <PAGE_SIZE>`: Number of items to show on a page (default: 20, max: 200).\n\n**Example:**\n\nList the first 7 files for the dataset `kerneler/brazilian-bird-observation-metadata-from-wikiaves`:\n\n```bash\nkaggle datasets files kerneler/brazilian-bird-observation-metadata-from-wikiaves --page-size=7\n```\n\n**Purpose:**\n\nUse this command to see the individual files within a dataset before downloading.\n\n## `kaggle datasets download`\n\nDownloads dataset files.\n\n**Usage:**\n\n```bash\nkaggle datasets download <DATASET> [options]\n```\n\n**Arguments:**\n\n*   `<DATASET>`: Dataset URL suffix (e.g., `willianoliveiragibin/pixar-films`).\n\n**Options:**\n\n*   `-f, --file <FILE_NAME>`: Specific file to download (downloads all if not specified).\n*   `-p, --path <PATH>`: Folder to download files to (defaults to current directory).\n*   `-w, --wp`: Download files to the current working path.\n*   `--unzip`: Unzip the downloaded file (deletes the .zip file afterwards).\n*   `-o, --force`: Force download, overwriting existing files.\n*   `-q, --quiet`: Suppress verbose output.\n\n**Examples:**\n\n1.  Download all files for the dataset `willianoliveiragibin/pixar-films`:\n\n    ```bash\n    kaggle datasets download -d willianoliveiragibin/pixar-films\n    ```\n\n2.  Download the dataset `goefft/public-datasets-with-file-types-and-columns`, unzip it into the `tmp` folder, overwriting if necessary, and suppress output:\n\n    ```bash\n    kaggle datasets download goefft/public-datasets-with-file-types-and-columns -p tmp --unzip -o -q\n    ```\n\n3.  Download the specific file `dataset_results.csv` from `goefft/public-datasets-with-file-types-and-columns` to the current working directory, quietly, and force overwrite:\n\n    ```bash\n    kaggle datasets download goefft/public-datasets-with-file-types-and-columns -f dataset_results.csv -w -q -o\n    ```\n\n**Purpose:**\n\nThis command allows you to retrieve dataset files for local use.\n\n## `kaggle datasets init`\n\nInitializes a metadata file (`dataset-metadata.json`) for creating a new dataset. See [metadata file format](./datasets_metadata.md).\n\n**Usage:**\n\n```bash\nkaggle datasets init -p <FOLDER_PATH>\n```\n\n**Options:**\n\n*   `-p, --path <FOLDER_PATH>`: The path to the folder where the `dataset-metadata.json` file will be created (defaults to the current directory).\n\n**Example:**\n\nInitialize a dataset metadata file in the `tests/dataset` folder:\n\n```bash\nkaggle datasets init -p tests/dataset\n```\n\n**Purpose:**\n\nThis command creates a template `dataset-metadata.json` file that you need to edit before creating a new dataset on Kaggle. This file contains information like the dataset title, ID (slug), and licenses.\n\n## `kaggle datasets create`\n\nCreates a new dataset on Kaggle.\n\n**Usage:**\n\n```bash\nkaggle datasets create -p <FOLDER_PATH> [options]\n```\n\n**Options:**\n\n*   `-p, --path <FOLDER_PATH>`: Path to the folder containing the data files and the `dataset-metadata.json` file (defaults to the current directory).\n*   `-u, --public`: Make the dataset public (default is private).\n*   `-q, --quiet`: Suppress verbose output.\n*   `-t, --keep-tabular`: Do not convert tabular files to CSV (default is to convert).\n*   `-r, --dir-mode <MODE>`: How to handle directories: `skip` (ignore), `zip` (compressed upload), `tar` (uncompressed upload) (default: `skip`).\n\n**Example:**\n\nCreate a new public dataset from the files in `tests/dataset`, quietly, without converting tabular files, and skipping subdirectories. (Assumes `dataset-metadata.json` in `tests/dataset` has been properly edited with title and slug):\n\n```bash\n# Example: Edit dataset-metadata.json first\n# sed -i 's/INSERT_TITLE_HERE/My Dataset Title/' tests/dataset/dataset-metadata.json\n# sed -i 's/INSERT_SLUG_HERE/my-dataset-slug/' tests/dataset/dataset-metadata.json\n\nkaggle datasets create -p tests/dataset --public -q -t -r skip\n```\n\n**Purpose:**\n\nThis command uploads your local data files and the associated metadata to create a new dataset on Kaggle.\n\n## `kaggle datasets version`\n\nCreates a new version of an existing dataset.\n\n**Usage:**\n\n```bash\nkaggle datasets version -p <FOLDER_PATH> -m <VERSION_NOTES> [options]\n```\n\n**Options:**\n\n*   `-p, --path <FOLDER_PATH>`: Path to the folder containing the updated data files and `dataset-metadata.json` (defaults to current directory).\n*   `-m, --message <VERSION_NOTES>`: (Required) Message describing the new version.\n*   `-q, --quiet`: Suppress verbose output.\n*   `-t, --keep-tabular`: Do not convert tabular files to CSV.\n*   `-r, --dir-mode <MODE>`: Directory handling mode (`skip`, `zip`, `tar`).\n*   `-d, --delete-old-versions`: Delete old versions of this dataset.\n\n**Example:**\n\nCreate a new version of a dataset using files from `tests/dataset` with version notes \"Updated data\", quietly, keeping tabular formats, skipping directories, and deleting old versions:\n\n```bash\nkaggle datasets version -m \"Updated data\" -p tests/dataset -q -t -r skip -d\n```\n\n**Purpose:**\n\nUse this command to update an existing dataset with new files or metadata changes.\n\n## `kaggle datasets metadata`\n\nDownloads metadata for a dataset or updates existing local metadata.\n\n**Usage:**\n\n```bash\nkaggle datasets metadata <DATASET> [options]\n```\n\n**Arguments:**\n\n*   `<DATASET>`: Dataset URL suffix (e.g., `goefft/public-datasets-with-file-types-and-columns`).\n\n**Options:**\n\n*   `-p, --path <PATH>`: Directory to download/update metadata file (`dataset-metadata.json`). Defaults to current working directory.\n*   `--update`: Update existing local metadata file instead of downloading anew.\n\n**Example:**\n\nDownload metadata for the dataset `goefft/public-datasets-with-file-types-and-columns` into the `tests/dataset` folder:\n\n```bash\nkaggle datasets metadata goefft/public-datasets-with-file-types-and-columns -p tests/dataset\n```\n\n**Purpose:**\n\nThis command allows you to fetch the `dataset-metadata.json` file for an existing dataset, which can be useful for inspection or as a template for creating a new version.\n\n## `kaggle datasets status`\n\nGets the creation status of a dataset.\n\n**Usage:**\n\n```bash\nkaggle datasets status <DATASET>\n```\n\n**Arguments:**\n\n*   `<DATASET>`: Dataset URL suffix (e.g., `goefft/public-datasets-with-file-types-and-columns`).\n\n**Example:**\n\nGet the status of the dataset `goefft/public-datasets-with-file-types-and-columns`:\n\n```bash\nkaggle datasets status goefft/public-datasets-with-file-types-and-columns\n```\n\n**Purpose:**\n\nAfter creating or updating a dataset, this command helps you check if the process was successful or if there were any issues.\n\n## `kaggle datasets delete`\n\nDeletes a dataset from Kaggle.\n\n**Usage:**\n\n```bash\nkaggle datasets delete <DATASET> [options]\n```\n\n**Arguments:**\n\n*   `<DATASET>`: Dataset URL suffix (e.g., `username/dataset-slug`).\n\n**Options:**\n\n*   `-y, --yes`: Automatically confirm deletion without prompting.\n\n**Example:**\n\nDelete the dataset `username/dataset-slug` and automatically confirm:\n\n```bash\nkaggle datasets delete username/dataset-slug --yes\n```\n\n**Purpose:**\n\nThis command permanently removes one of your datasets from Kaggle. Use with caution.\n"
  },
  {
    "path": "docs/datasets_metadata.md",
    "content": "The Kaggle API follows the [Data Package specification](https://frictionlessdata.io/specs/data-package/) for specifying metadata when creating new Datasets and Dataset versions. Next to your files, you have to put a special `dataset-metadata.json` file in your upload folder alongside the files for each new Dataset (version). \r\n\r\nHere's a basic example for `dataset-metadata.json`:\r\n```\r\n{\r\n  \"title\": \"My Awesome Dataset\", \r\n  \"id\": \"timoboz/my-awesome-dataset\", \r\n  \"licenses\": [{\"name\": \"CC0-1.0\"}]\r\n}\r\n```\r\nYou can also use the API command `kaggle datasets init -p /path/to/dataset` to have the API create this file for you.\r\n\r\nHere's an example containing file metadata:\r\n```\r\n{\r\n  \"title\": \"My Awesome Dataset\", \r\n  \"subtitle\": \"My awesomer subtitle\",\r\n  \"description\": \"My awesomest description\",\r\n  \"id\": \"timoboz/my-awesome-dataset\", \r\n  \"id_no\": 12345,\r\n  \"licenses\": [{\"name\": \"CC0-1.0\"}],\r\n  \"resources\": [\r\n    {\r\n      \"path\": \"my-awesome-data.csv\",\r\n      \"description\": \"This is my awesome data!\",\r\n      \"schema\": {\r\n        \"fields\": [\r\n          {\r\n            \"name\": \"StringField\",\r\n            \"description\": \"String field description\",\r\n            \"type\": \"string\"\r\n          },\r\n          {\r\n            \"name\": \"NumberField\",\r\n            \"description\": \"Number field description\",\r\n            \"type\": \"number\"\r\n          },\r\n          {\r\n            \"name\": \"DateTimeField\",\r\n            \"description\": \"Date time field description\",\r\n            \"type\": \"datetime\"\r\n          }\r\n        ]\r\n      }\r\n    },\r\n    {\r\n      \"path\": \"my-awesome-extra-file.txt\",\r\n      \"description\": \"This is my awesome extra file!\"\r\n    }\r\n  ],\r\n  \"keywords\": [\r\n    \"beginner\",\r\n    \"tutorial\"\r\n  ]\r\n}\r\n```\r\n\r\n## Contents\r\nThe following metadata is currently supported:\r\n* `kaggle datasets create` (create a new Dataset):\r\n  * `title`: Title of the dataset, must be between 6 and 50 characters in length.\r\n  * `subtitle`: Subtitle of the dataset, must be between 20 and 80 characters in length.\r\n  * `description`: Description of the dataset. \r\n  * `id`: The URL slug of your new dataset, a combination of:\r\n    1. Your username or organization slug (if you are a member of an organization).\r\n    2. A unique Dataset slug, must be between 3 and 50 characters in length.\r\n  * `licenses`: Must have exactly one entry that specifies the license. Only `name` is evaluated, all other information is ignored. See below for options.\r\n  * `resources`: Contains an array of files that are being uploaded.  (Note - this is not required, nor if included, does it need to include all of the files to be uploaded.):\r\n    * `path`: File path.\r\n    * `description`: File description.\r\n    * `schema`: File schema (definition below):\r\n      * `fields`: Array of fields in the dataset.  Please note that this needs to include ALL of the fields in the data in order or they will not be matched up correctly.  A later version of the API will fix this bug.\r\n        * `name`: Field name\r\n        * `title`: Field description\r\n        * `type`: Field type. A best-effort list of types will be kept at the bottom of this page, but new types may be added that are not documented here.\r\n  * `keywords`: Contains an array of strings that correspond to an existing tag on Kaggle.  If a specified tag doesn't exist, the upload will continue, but that specific tag won't be added.  \r\n* `kaggle datasets version` (create a new version for an existing Dataset):\r\n  * `subtitle`: Subtitle of the dataset, must be between 20 and 80 characters in length.\r\n  * `description`: Description of the dataset. \r\n  * `id`: The URL slug of the dataset you want to update (see above). You must be the owner or otherwise have edit rights for this dataset. One of `id` or `id_no` must be specified. If both are, `id_no` will be preferred.\r\n  * `id_no`: The ID of the dataset. One of `id` or `id_no` must be specified. You must be the owner or otherwise have edit rights for this dataset. If both are, `id_no` will be preferred.\r\n  * `resources`: Contains an array of files that are being uploaded.  (Note - this is not required, nor if included, does it need to include all of the files to be uploaded.):\r\n    * `path`: File path.\r\n    * `description`: File description.\r\n    * `schema`: File schema (definition below):\r\n      * `fields`: Array of fields in the dataset.  Please note that this needs to include ALL of the fields in the data in order or they will not be matched up correctly.  A later version of the API will fix this bug.\r\n        * `name`: Field name\r\n        * `title`: Field description\r\n        * `type`: Field type. A best-effort list of types will be kept at the bottom of this page, but new types may be added that are not documented here.\r\n  * `keywords`: Contains an array of strings that correspond to an existing tag on Kaggle.  If a specified tag doesn't exist, the upload will continue, but that specific tag won't be added.  \r\n\r\nWe will add further metadata processing in upcoming versions of the API.\r\n\r\n## Licenses\r\nYou can specify the following licenses for your datasets:\r\n* `CC0-1.0`: [CC0: Public Domain](https://creativecommons.org/publicdomain/zero/1.0/)\r\n* `CC-BY-SA-3.0`: [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/)\r\n* `CC-BY-SA-4.0`: [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)\r\n* `CC-BY-NC-SA-4.0`: [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)\r\n* `GPL-2.0`: [GPL 2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)\r\n* `ODbL-1.0`: Database: [Open Database](http://opendatacommons.org/licenses/odbl/1.0/), Contents: © Original Authors\r\n* `DbCL-1.0`: Database: [Open Database](http://opendatacommons.org/licenses/odbl/1.0/), Contents: [Database Contents](http://opendatacommons.org/licenses/dbcl/1.0/)\r\n* `copyright-authors`: Data files © Original Authors\r\n* `other`: Other (specified in description)\r\n* `unknown`: Unknown\r\n* `CC-BY-4.0`: \t\r\nhttps://creativecommons.org/licenses/by/4.0/\r\n* `CC-BY-NC-4.0`: https://creativecommons.org/licenses/by-nc/4.0/\r\n* `PDDL`: https://opendatacommons.org/licenses/pddl/1.0/\r\n* `CC-BY-3.0`: \t\r\nhttps://creativecommons.org/licenses/by/3.0/\r\n* `CC-BY-3.0-IGO`: \t\r\nhttps://creativecommons.org/licenses/by/3.0/igo/\r\n* `US-Government-Works`: \t\r\nhttps://www.usa.gov/government-works/\r\n* `CC-BY-NC-SA-3.0-IGO`: \t\r\nhttps://creativecommons.org/licenses/by-nc-sa/3.0/igo/\r\n* `CDLA-Permissive-1.0`: \t\r\nhttps://cdla.io/permissive-1-0/\r\n* `CDLA-Sharing-1.0`: \t\r\nhttps://cdla.io/sharing-1-0/\r\n* `CC-BY-ND-4.0`: \t\r\nhttps://creativecommons.org/licenses/by-nd/4.0/\r\n* `CC-BY-NC-ND-4.0`: \t\r\nhttps://creativecommons.org/licenses/by-nc-nd/4.0/\r\n* `ODC-BY-1.0`: \t\r\nhttps://opendatacommons.org/licenses/by/1-0/index.html\r\n* `LGPL-3.0`: \t\r\nhttp://www.gnu.org/licenses/lgpl-3.0.html\r\n* `AGPL-3.0`: \t\r\nhttp://www.gnu.org/licenses/agpl-3.0.html\r\n* `FDL-1.3`: \t\r\nhttp://www.gnu.org/licenses/fdl-1.3.html\r\n* `EU-ODP-Legal-Notice`: https://ec.europa.eu/info/legal-notice_en\r\n* `apache-2.0`: \t\r\nhttps://www.apache.org/licenses/LICENSE-2.0\r\n* `GPL-3.0`: [GPL 2](https://www.gnu.org/licenses/gpl-3.0.html)\r\n\r\n## Data types\r\nYou can specify the following data types\r\n* `string`\r\n* `boolean`\r\n* `numeric`\r\n* `datetime`\r\n* `id`\r\n* `uuid`\r\n* `latitude`\r\n* `longitude`\r\n* `coordinates`\r\n* `country`\r\n* `province` (these are states in the US)\r\n* `postalcode`\r\n* `address`\r\n* `email`\r\n* `url`\r\n* `integer`\r\n* `decimal`\r\n* `city`\r\n"
  },
  {
    "path": "docs/index.rst",
    "content": ".. _kaggle:\n\n.. kaggle-cli documentation master file, created by\n   sphinx-quickstart on Thu Jun 26 22:53:21 2025.\n   You can adapt this file completely to your liking, but it should at least\n   contain the root `toctree` directive.\n\nkaggle-cli documentation\n========================\n\n.. toctree::\n   :maxdepth: 2\n   :caption: Contents:\n\n   intro\n   configuration\n   competitions\n   datasets\n   kernels\n   models\n   model_instances\n   model_instances_versions\n   tutorials\n"
  },
  {
    "path": "docs/kernels.md",
    "content": "# Kernels Commands\n\nCommands for interacting with Kaggle Kernels (notebooks and scripts).\n\n## `kaggle kernels list`\n\nLists available kernels.\n\n**Usage:**\n\n```bash\nkaggle kernels list [options]\n```\n\n**Options:**\n\n*   `-m, --mine`: Display only your kernels.\n*   `-p, --page <PAGE>`: Page number for results (default: 1).\n*   `--page-size <SIZE>`: Number of items per page (default: 20).\n*   `-s, --search <SEARCH_TERM>`: Search term.\n*   `-v, --csv`: Print results in CSV format.\n*   `--parent <PARENT_KERNEL>`: Filter by parent kernel (format: `owner/kernel-slug`).\n*   `--competition <COMPETITION_SLUG>`: Filter by competition.\n*   `--dataset <DATASET_SLUG>`: Filter by dataset (format: `owner/dataset-slug`).\n*   `--user <USER>`: Filter by a specific user.\n*   `--language <LANGUAGE>`: Filter by language (`all`, `python`, `r`, `sqlite`, `julia`).\n*   `--kernel-type <TYPE>`: Filter by kernel type (`all`, `script`, `notebook`).\n*   `--output-type <TYPE>`: Filter by output type (`all`, `visualizations`, `data`).\n*   `--sort-by <SORT_BY>`: Sort results (`hotness`, `commentCount`, `dateCreated`, `dateRun`, `relevance`, `scoreAscending`, `scoreDescending`, `viewCount`, `voteCount`). Default: `hotness`.\n\n**Examples:**\n\n1.  List your own kernels containing \"Exercise\" in the title, page 2, 5 items per page, in CSV format, sorted by run date:\n\n    ```bash\n    kaggle kernels list -m -s Exercise --page-size 5 -p 2 -v --sort-by dateRun\n    ```\n\n2.  List kernels that are children of `$KAGGLE_DEVELOPER/exercise-lists` (replace `$KAGGLE_DEVELOPER` with your username):\n\n    ```bash\n    kaggle kernels list --parent $KAGGLE_DEVELOPER/exercise-lists\n    ```\n\n3.  List the first 5 kernels for the \"house-prices-advanced-regression-techniques\" competition:\n\n    ```bash\n    kaggle kernels list --competition house-prices-advanced-regression-techniques --page-size 5\n    ```\n\n4.  List the first 5 kernels associated with the dataset `dansbecker/home-data-for-ml-course`:\n\n    ```bash\n    kaggle kernels list --dataset dansbecker/home-data-for-ml-course --page-size 5\n    ```\n\n5.  List Python notebooks by user `$KAGGLE_DEVELOPER` that output data:\n\n    ```bash\n    kaggle kernels list --user $KAGGLE_DEVELOPER --language python --kernel-type notebook --output-type data\n    ```\n\n**Purpose:**\n\nThis command allows you to find kernels based on various filters like ownership, associated competition/dataset, language, or type.\n\n## `kaggle kernels files`\n\nLists output files for a specific kernel.\n\n**Usage:**\n\n```bash\nkaggle kernels files <KERNEL> [options]\n```\n\n**Arguments:**\n\n*   `<KERNEL>`: Kernel URL suffix (format: `owner/kernel-slug`, e.g., `kerneler/sqlite-global-default`).\n\n**Options:**\n\n*   `-v, --csv`: Print results in CSV format.\n*   `--page-token <PAGE_TOKEN>`: Page token for results paging.\n*   `--page-size <PAGE_SIZE>`: Number of items to show on a page (default: 20, max: 200).\n\n**Example:**\n\nList the first output file for the kernel `kerneler/sqlite-global-default` in CSV format:\n\n```bash\nkaggle kernels files kerneler/sqlite-global-default -v --page-size=1\n```\n\n**Purpose:**\n\nUse this command to view the files generated by a kernel run.\n\n## `kaggle kernels init`\n\nInitializes a metadata file (`kernel-metadata.json`) for a new or existing kernel. See [metadata file format](./kernels_metadata.md).\n\n**Usage:**\n\n```bash\nkaggle kernels init -p <FOLDER_PATH>\n```\n\n**Options:**\n\n*   `-p, --path <FOLDER_PATH>`: The path to the folder where the `kernel-metadata.json` file will be created (defaults to the current directory).\n\n**Example:**\n\nInitialize a kernel metadata file in the `tests/kernel` folder:\n\n```bash\nkaggle kernels init -p tests/kernel\n```\n\n**Purpose:**\n\nThis command creates a template `kernel-metadata.json` file. You need to edit this file with details like the kernel's title, ID (slug), language, kernel type, and data sources before pushing it to Kaggle.\n\n## `kaggle kernels push`\n\nPushes new code/notebook and metadata to a kernel, then runs the kernel.\n\n**Usage:**\n\n```bash\nkaggle kernels push -p <FOLDER_PATH> [options]\n```\n\n**Options:**\n\n*   `--accelerator <ACCELERATOR_ID>`: ID name of the accelerator to use during the run. E.g. \"NvidiaTeslaP100\" (aka default GPU), \"NvidiaTeslaT4\", \"TpuV6E8\".\n*   `-p, --path <FOLDER_PATH>`: Path to the folder containing the kernel file (e.g., `.ipynb`, `.Rmd`, `.py`) and the `kernel-metadata.json` file (defaults to the current directory).\n*   `-t, --timeout <SECONDS>`: Maximum run time in seconds.\n\n**Example:**\n\nPush the kernel from the `tests/kernel` folder (assuming it contains the kernel file and `kernel-metadata.json`):\n\n```bash\nkaggle kernels push -p tests/kernel\n```\n\n**Purpose:**\n\nThis command uploads your local kernel file and its metadata to Kaggle. If the kernel specified in the metadata exists under your account, it will be updated. Otherwise, a new kernel will be created. After uploading, Kaggle will attempt to run the kernel.\n\nAccelerators available as of Feb 2026:\n\n* NvidiaTeslaP100\n* TpuV38\n* NvidiaTeslaT4\n* NvidiaTeslaT4Highmem\n* Tpu1VmV38\n* NvidiaTeslaA100\n* NvidiaL4\n* TpuV5E8\n* NvidiaL4X1\n* TpuV6E8\n* NvidiaH100\n* NvidiaRtxPro6000\n\nSome of these are only available to participants of specific competitions, and some are only available to Kaggle admins.\n\n## `kaggle kernels pull`\n\nPulls down the code/notebook and metadata for a kernel.\n\n**Usage:**\n\n```bash\nkaggle kernels pull <KERNEL> [options]\n```\n\n**Arguments:**\n\n*   `<KERNEL>`: Kernel URL suffix (format: `owner/kernel-slug`, e.g., `$KAGGLE_DEVELOPER/exercise-as-with`).\n\n**Options:**\n\n*   `-p, --path <PATH>`: Folder to download files to (defaults to current directory).\n*   `-w, --wp`: Download files to the current working path.\n*   `-m, --metadata`: Generate a `kernel-metadata.json` file along with the kernel code.\n\n**Examples:**\n\n1.  Pull the kernel `$KAGGLE_DEVELOPER/exercise-as-with` and its metadata into the `tests/kernel` folder:\n\n    ```bash\n    kaggle kernels pull -p tests/kernel $KAGGLE_DEVELOPER/exercise-as-with -m\n    ```\n\n2.  Pull the kernel `$KAGGLE_DEVELOPER/exercise-as-with` into the current working directory:\n\n    ```bash\n    kaggle kernels pull --wp $KAGGLE_DEVELOPER/exercise-as-with\n    ```\n\n**Purpose:**\n\nThis command allows you to download the source code and optionally the metadata of a kernel from Kaggle to your local machine.\n\n## `kaggle kernels output`\n\nGets the data output from the latest run of a kernel.\n\n**Usage:**\n\n```bash\nkaggle kernels output <KERNEL> [options]\n```\n\n**Arguments:**\n\n*   `<KERNEL>`: Kernel URL suffix (e.g., `kerneler/using-google-bird-vocalization-model`).\n\n**Options:**\n\n*   `-p, --path <PATH>`: Folder to download output files to (defaults to current directory).\n*   `-w, --wp`: Download files to the current working path.\n*   `-o, --force`: Force download, overwriting existing files.\n*   `-q, --quiet`: Suppress verbose output.\n*   `--file-pattern <REGEX>`: Regex pattern to match against filenames. Only files matching the pattern will be downloaded.\n\n**Example:**\n\nDownload the output of the kernel `kerneler/using-google-bird-vocalization-model`, forcing overwrite:\n\n```bash\nkaggle kernels output kerneler/sqlite-global-default -o\n```\nDownload PNG files only:\n\n```bash\nkaggle kernels output <kernel> --file-pattern \".*\\.png$\"  # Only PNG files\n```\n\n**Purpose:**\n\nUse this command to retrieve the files generated by a kernel run, such as submission files, processed data, or visualizations.\n\n## `kaggle kernels status`\n\nDisplays the status of the latest run of a kernel.\n\n**Usage:**\n\n```bash\nkaggle kernels status <KERNEL>\n```\n\n**Arguments:**\n\n*   `<KERNEL>`: Kernel URL suffix (e.g., `kerneler/sqlite-global-default`).\n\n**Example:**\n\nGet the status of the kernel `kerneler/sqlite-global-default`:\n\n```bash\nkaggle kernels status kerneler/sqlite-global-default\n```\n\n**Purpose:**\n\nThis command tells you whether the latest run of your kernel is still running, completed successfully, or failed.\n\n## `kaggle kernels delete`\n\nDeletes a kernel from Kaggle.\n\n**Usage:**\n\n```bash\nkaggle kernels delete <KERNEL> [options]\n```\n\n**Arguments:**\n\n*   `<KERNEL>`: Kernel URL suffix (format: `owner/kernel-slug`, e.g., `$KAGGLE_DEVELOPER/exercise-delete`).\n\n**Options:**\n\n*   `-y, --yes`: Automatically confirm deletion without prompting.\n\n**Example:**\n\nDelete the kernel `$KAGGLE_DEVELOPER/exercise-delete` and automatically confirm:\n\n```bash\nkaggle kernels delete $KAGGLE_DEVELOPER/exercise-delete --yes\n```\n\n**Purpose:**\n\nThis command permanently removes one of your kernels from Kaggle. Use with caution.\n"
  },
  {
    "path": "docs/kernels_metadata.md",
    "content": "To upload and run a kernel, a special `kernel-metadata.json` file must be specified. \r\n\r\nHere's a basic example for `kernel-metadata.json`:\r\n```\r\n{\r\n  \"id\": \"timoboz/my-awesome-kernel\",\r\n  \"id_no\": 12345,\r\n  \"title\": \"My Awesome Kernel\",\r\n  \"code_file\": \"my-awesome-kernel.ipynb\",\r\n  \"language\": \"python\",\r\n  \"kernel_type\": \"notebook\",\r\n  \"is_private\": \"false\",\r\n  \"enable_gpu\": \"false\",\r\n  \"enable_internet\": \"false\",\r\n  \"dataset_sources\": [\"timoboz/my-awesome-dataset\"],\r\n  \"competition_sources\": [],\r\n  \"kernel_sources\": [],\r\n  \"model_sources\": []\r\n}\r\n```\r\nYou can also use the API command `kaggle kernels init -p /path/to/kernel` to have the API create this file for you for a new kernel. If you wish to get the metadata for an existing kernel, you can use `kaggle kernels pull -p /path/to/download -k username/kernel-slug -m`.\r\n\r\n## Contents\r\nWe currently support the following metadata fields for kernels.\r\n* `id`: The URL slug of your kernel. One of `id` or `id_no` must be specified. If both are, `id_no` will be preferred.\r\n  1. Your username slug\r\n  2. A unique kernel slug\r\n* `id_no`: The kernel's numeric ID.  One of `id` or `id_no` must be specified. If both are, `id_no` will be preferred.\r\n* `title`: The title of the kernel. Required for new kernels - optional for existing ones. Please be aware that kernel titles and slugs are linked to each other. A kernel slug is always the title lowercased with dashes (`-`) replacing spaces. \r\n  * If you wish to rename your kernel, you may change the title within the metadata. However, you will need to update the `id` as well AFTER the rename is complete.\r\n* `code_file`: The path to your kernel source code. Required. If not an absolute path, it should be relative to the location of `kernel-metadata.json`.\r\n* `language`: The language your kernel is written in. Valid options are `python`, `r`, and `rmarkdown`. Required.\r\n* `kernel_type`: The type of kernel. Valid options are `script` and `notebook`. Required.\r\n* `is_private`: Whether or not the kernel should be private. If not specified, will be `true`.\r\n* `enable_gpu`: Whether or not the kernel should run on a GPU. If not specified, will be `false`.\r\n* `enable_internet`: Whether or not the kernel should be able to access the internet. If not specified, will be `false`.\r\n* `dataset_sources`: A list of dataset sources, specified as `\"username/dataset-slug\"`\r\n* `competition_sources`: A list of competition sources, specified as `\"competition-slug\"`\r\n* `kernel_sources`: A list of kernel sources, specified as `\"username/kernel-slug\"`\r\n* `model_sources`: A list of model sources, specified as `\"username/model-slug/framework/variation-slug/version-number\"`\r\n\r\nWe will add further metadata processing in upcoming versions of the API."
  },
  {
    "path": "docs/make.bat",
    "content": "@ECHO OFF\r\n\r\npushd %~dp0\r\n\r\nREM Command file for Sphinx documentation\r\n\r\nif \"%SPHINXBUILD%\" == \"\" (\r\n\tset SPHINXBUILD=sphinx-build\r\n)\r\nset SOURCEDIR=.\r\nset BUILDDIR=_build\r\n\r\n%SPHINXBUILD% >NUL 2>NUL\r\nif errorlevel 9009 (\r\n\techo.\r\n\techo.The 'sphinx-build' command was not found. Make sure you have Sphinx\r\n\techo.installed, then set the SPHINXBUILD environment variable to point\r\n\techo.to the full path of the 'sphinx-build' executable. Alternatively you\r\n\techo.may add the Sphinx directory to PATH.\r\n\techo.\r\n\techo.If you don't have Sphinx installed, grab it from\r\n\techo.https://www.sphinx-doc.org/\r\n\texit /b 1\r\n)\r\n\r\nif \"%1\" == \"\" goto help\r\n\r\n%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%\r\ngoto end\r\n\r\n:help\r\n%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%\r\n\r\n:end\r\npopd\r\n"
  },
  {
    "path": "docs/model_variations.md",
    "content": "# Model Variation Commands\n\nCommands for interacting with variations of Kaggle Models. A model variation typically represents a specific framework of a parent model.\n\n## `kaggle models variations init`\n\nInitializes a metadata file (`model-instance-metadata.json`) for creating a new model variation.\nNote that the name of the file reflects the old name for a variation, which was \"instance\".\n\n**Usage:**\n\n```bash\nkaggle models variations init -p <FOLDER_PATH>\n```\n\n**Options:**\n\n*   `-p, --path <FOLDER_PATH>`: The path to the folder where the `model-instance-metadata.json` file will be created (defaults to the current directory).\n\n**Example:**\n\nInitialize a model variation metadata file in the `tmp` folder:\n\n```bash\nkaggle models variations init -p tmp\n```\n\n**Purpose:**\n\nThis command creates a template `model-instance-metadata.json` file. You must edit this file with details such as the owner slug, the parent model slug, the variation (or instance) slug (URL-friendly name for this variations), and the framework (e.g., `tensorflow`, `pytorch`, `jax`, `sklearn`) before creating the variation.\n\n## `kaggle models variations create`\n\nCreates a new model variation under an existing model on Kaggle.\n\n**Usage:**\n\n```bash\nkaggle models variations create -p <FOLDER_PATH> [options]\n```\n\n**Options:**\n\n*   `-p, --path <FOLDER_PATH>`: Path to the folder containing the model variation files and the `model-instance-metadata.json` file (defaults to the current directory).\n*   `-q, --quiet`: Suppress verbose output.\n*   `-r, --dir-mode <MODE>`: How to handle directories within the upload: `skip` (ignore), `zip` (compressed upload), `tar` (uncompressed upload) (default: `skip`).\n\n**Example:**\n\nCreate a new model variation using the metadata and files in the `tmp` folder, quietly, skipping subdirectories. (Assumes `model-instance-metadata.json` in `tmp` has been properly edited):\n\n```bash\n# Example: Edit model-instance-metadata.json first\n# sed -i 's/INSERT_OWNER_SLUG_HERE/your-username/' tmp/model-instance-metadata.json\n# sed -i 's/INSERT_EXISTING_MODEL_SLUG_HERE/parent-model-slug/' tmp/model-instance-metadata.json\n# sed -i 's/INSERT_INSTANCE_SLUG_HERE/my-variation-slug/' tmp/model-instance-metadata.json\n# sed -i 's/INSERT_FRAMEWORK_HERE/jax/' tmp/model-instance-metadata.json\n# echo \"a,b,c,d\" > tmp/data.csv # Example model file\n\nkaggle models variations create -p tmp -q -r skip\n```\n\n**Purpose:**\n\nThis command uploads your local model files (e.g., weights, architecture definition) and the associated variation metadata to create a new variation under a specified parent model on Kaggle. This effectively creates the first version of this model variation.\n\n## `kaggle models variations get`\n\nDownloads the `model-instance-metadata.json` file for an existing model variation.\n\n**Usage:**\n\n```bash\nkaggle models variations get <MODEL_VARIATION> -p <FOLDER_PATH>\n```\n\n**Arguments:**\n\n*   `<MODEL_VARIATION>`: Model variation URL suffix in the format `owner/model-slug/framework/variation-slug` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`).\n\n**Options:**\n\n*   `-p, --path <FOLDER_PATH>`: Folder to download the `model-instance-metadata.json` file to.\n\n**Example:**\n\nDownload the metadata for model variation `$KAGGLE_DEVELOPER/test-model/jax/main` into the `tmp` folder:\n\n```bash\nkaggle models variations get $KAGGLE_DEVELOPER/test-model/jax/main -p tmp\n```\n\n**Purpose:**\n\nThis command retrieves the metadata file for an existing model variation. This can be useful for inspection or as a basis for an update.\n\n## `kaggle models variations files`\n\nLists files for the current version of a model variation.\n\n**Usage:**\n\n```bash\nkaggle models variations files <MODEL_VARIATION> [options]\n```\n\n**Arguments:**\n\n*   `<MODEL_VARIATION>`: Model variation URL suffix (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`).\n\n**Options:**\n\n*   `-v, --csv`: Print results in CSV format.\n*   `--page-size <SIZE>`: Number of items per page (default: 20).\n*   `--page-token <TOKEN>`: Page token for results paging.\n\n**Example:**\n\nList the first 5 files for the model variation `$KAGGLE_DEVELOPER/test-model/jax/main` in CSV format:\n\n```bash\nkaggle models variations files $KAGGLE_DEVELOPER/test-model/jax/main -v --page-size 5\n```\n\n**Purpose:**\n\nUse this command to see the files associated with the latest version of a specific model variation.\n\n## `kaggle models variations update`\n\nUpdates an existing model variation on Kaggle using a local `model-instance-metadata.json` file.\n\n**Usage:**\n\n```bash\nkaggle models variations update -p <FOLDER_PATH>\n```\n\n**Options:**\n\n*   `-p, --path <FOLDER_PATH>`: Path to the folder containing the `model-instance-metadata.json` file with the updated information (defaults to the current directory). Note: This command only updates the metadata of the variation, not the files. To update files, create a new version.\n\n**Example:**\n\nUpdate the model variation whose details are in `tmp/model-instance-metadata.json` (ensure the slugs and owner in the JSON match an existing model variation):\n\n```bash\nkaggle models variations update -p tmp\n```\n\n**Purpose:**\n\nUse this command to change the metadata of an existing model variation, such as its description or other fields defined in the `model-instance-metadata.json` file. This does not upload new files or create a new version.\n\n## `kaggle models variations delete`\n\nDeletes a model variation from Kaggle.\n\n**Usage:**\n\n```bash\nkaggle models variations delete <MODEL_VARIATION> [options]\n```\n\n**Arguments:**\n\n*   `<MODEL_VARIATION>`: Model variation URL suffix in the format `owner/model-slug/framework/variation-slug` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`).\n\n**Options:**\n\n*   `-y, --yes`: Automatically confirm deletion without prompting.\n\n**Example:**\n\nDelete the model variation `$KAGGLE_DEVELOPER/test-model/jax/main` and automatically confirm:\n\n```bash\nkaggle models variations delete $KAGGLE_DEVELOPER/test-model/jax/main -y\n```\n\n**Purpose:**\n\nThis command permanently removes one of your model variations (and all its versions) from Kaggle. Use with caution.\n"
  },
  {
    "path": "docs/model_variations_versions.md",
    "content": "# Model Variation Versions Commands\n\nCommands for managing versions of a specific Kaggle Model Variation. Each version represents a snapshot of the model variation files at a point in time.\n\n## `kaggle models variations versions create`\n\nCreates a new version of an existing model variation.\n\n**Usage:**\n\n```bash\nkaggle models variations versions create <MODEL_VARIATION> -p <FOLDER_PATH> [options]\n```\n\n**Arguments:**\n\n*   `<MODEL_VARIATION>`: The target model variation URL suffix for the new version (format: `owner/model-slug/framework/variation-slug`, e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`).\n\n**Options:**\n\n*   `-p, --path <FOLDER_PATH>`: Path to the folder containing the files for this new version (defaults to the current directory).\n*   `-n, --version-notes <NOTES>`: Notes describing this version.\n*   `-q, --quiet`: Suppress verbose output.\n*   `-r, --dir-mode <MODE>`: How to handle directories within the upload: `skip` (ignore), `zip` (compressed upload), `tar` (uncompressed upload) (default: `skip`).\n\n**Example:**\n\nCreate a new version for the model variation `$KAGGLE_DEVELOPER/test-model/jax/main` using files from the `tmp` folder, with version notes \"Updated model files\", quietly, and skipping subdirectories:\n\n```bash\n# Ensure tmp folder contains the new files for the version, e.g., data_v2.csv\n# echo \"e,f,g,h\" > tmp/data_v2.csv\n\nkaggle models variations versions create $KAGGLE_DEVELOPER/test-model/jax/main -p tmp -n \"Updated model files\" -q -r skip\n```\n\n**Purpose:**\n\nThis command uploads a new set of files to an existing model variation, creating a new, numbered version. This allows you to track changes and revert to previous versions of your model variation files.\n\n## `kaggle models variations versions download`\n\nDownloads files for a specific version of a model variation.\n\n**Usage:**\n\n```bash\nkaggle models variations versions download <MODEL_VARIATION_VERSION> [options]\n```\n\n**Arguments:**\n\n*   `<MODEL_VARIATION_VERSION>`: Model variation version URL suffix in the format `owner/model-slug/framework/variation-slug/version-number` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main/1`).\n\n**Options:**\n\n*   `-p, --path <PATH>`: Folder to download files to (defaults to current directory).\n*   `--untar`: Untar the downloaded file if it's a `.tar` archive (deletes the `.tar` file afterwards).\n*   `--unzip`: Unzip the downloaded file if it's a `.zip` archive (deletes the `.zip` file afterwards).\n*   `-f, --force`: Force download, overwriting existing files.\n*   `-q, --quiet`: Suppress verbose output.\n\n**Example:**\n\nDownload version 1 of the model variation `$KAGGLE_DEVELOPER/test-model/jax/main` into the `tmp` folder, untar if applicable, force overwrite, and do it quietly:\n\n```bash\nkaggle models variations versions download $KAGGLE_DEVELOPER/test-model/jax/main/1 -p tmp -q -f --untar\n```\n\n**Purpose:**\n\nThis command allows you to retrieve the specific files associated with a particular version of a model variation.\n\n## `kaggle models variations versions files`\n\nLists files for a specific version of a model variation.\n\n**Usage:**\n\n```bash\nkaggle models variations versions files <MODEL_VARIATION_VERSION> [options]\n```\n\n**Arguments:**\n\n*   `<MODEL_VARIATION_VERSION>`: Model variation version URL suffix (e.g., `google/gemma/pytorch/7b/2`).\n\n**Options:**\n\n*   `-v, --csv`: Print results in CSV format.\n*   `--page-size <SIZE>`: Number of items per page (default: 20).\n*   `--page-token <TOKEN>`: Page token for results paging.\n\n**Example:**\n\nList the first 3 files for version 2 of the model variation `google/gemma/pytorch/7b` in CSV format:\n\n```bash\nkaggle models variations versions files google/gemma/pytorch/7b/2 -v --page-size=3\n```\n\n**Purpose:**\n\nUse this command to see the individual files that constitute a specific version of a model variation before downloading.\n\n## `kaggle models variations versions delete`\n\nDeletes a specific version of a model variation from Kaggle.\n\n**Usage:**\n\n```bash\nkaggle models variations versions delete <MODEL_VARIATION_VERSION> [options]\n```\n\n**Arguments:**\n\n*   `<MODEL_VARIATION_VERSION>`: Model variation version URL suffix in the format `owner/model-slug/framework/variation-slug/version-number` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main/1`).\n\n**Options:**\n\n*   `-y, --yes`: Automatically confirm deletion without prompting.\n\n**Example:**\n\nDelete version 1 of the model variation `$KAGGLE_DEVELOPER/test-model/jax/main` and automatically confirm:\n\n```bash\nkaggle models variations versions delete $KAGGLE_DEVELOPER/test-model/jax/main/1 -y\n```\n\n**Purpose:**\n\nThis command permanently removes a specific version of your model variation from Kaggle. Use with caution. If it's the only version, this may lead to the deletion of the model variation itself if no other versions exist.\n"
  },
  {
    "path": "docs/models.md",
    "content": "# Models Commands\n\nCommands for interacting with Kaggle Models.\n\n## `kaggle models list`\n\nLists available models.\n\n**Usage:**\n\n```bash\nkaggle models list [options]\n```\n\n**Options:**\n\n*   `--owner <OWNER>`: Filter by a specific user or organization.\n*   `--sort-by <SORT_BY>`: Sort results. Valid options: `hotness`, `downloadCount`, `voteCount`, `notebookCount`, `createTime` (default: `hotness`).\n*   `-s, --search <SEARCH_TERM>`: Search term.\n*   `--page-size <SIZE>`: Number of items per page (default: 20).\n*   `--page-token <TOKEN>`: Page token for results paging.\n*   `-v, --csv`: Print results in CSV format.\n\n**Examples:**\n\n1.  List models owned by `$KAGGLE_DEVELOPER` (replace with your username), sorted by creation time, in CSV format:\n\n    ```bash\n    kaggle models list --owner $KAGGLE_DEVELOPER --sort-by createTime -v\n    ```\n\n2.  List the first 5 models matching the search term \"gemini\":\n\n    ```bash\n    kaggle models list -s gemini --page-size 5\n    ```\n\n**Purpose:**\n\nThis command helps you find models on Kaggle, filtering by owner or searching by keywords, and sorting by various criteria.\n\n## `kaggle models init`\n\nInitializes a metadata file (`model-metadata.json`) for creating a new model. See [metadata file format](./models_metadata.md).\n\n**Usage:**\n\n```bash\nkaggle models init -p <FOLDER_PATH>\n```\n\n**Options:**\n\n*   `-p, --path <FOLDER_PATH>`: The path to the folder where the `model-metadata.json` file will be created (defaults to the current directory).\n\n**Example:**\n\nInitialize a model metadata file in a new temporary folder `tmp`:\n\n```bash\nmkdir tmp\nkaggle models init -p tmp\n```\n\n**Purpose:**\n\nThis command creates a template `model-metadata.json` file. You must edit this file with your model's details, such as owner slug, title, model slug (URL-friendly version of the title), and a description, before creating the model on Kaggle.\n\n## `kaggle models create`\n\nCreates a new model on Kaggle.\n\n**Usage:**\n\n```bash\nkaggle models create -p <FOLDER_PATH>\n```\n\n**Options:**\n\n*   `-p, --path <FOLDER_PATH>`: Path to the folder containing the `model-metadata.json` file (defaults to the current directory). This folder should also contain your model files that you intend to upload as part of the first model variation.\n\n**Example:**\n\nCreate a new model using the metadata in `tmp/model-metadata.json`. (Assumes the metadata file has been edited with owner, title, and slug):\n\n```bash\n# Example: Edit model-metadata.json first\n# sed -i 's/INSERT_OWNER_SLUG_HERE/your-username/' tmp/model-metadata.json\n# sed -i 's/INSERT_TITLE_HERE/My Awesome Model/' tmp/model-metadata.json\n# sed -i 's/INSERT_SLUG_HERE/my-awesome-model/' tmp/model-metadata.json\n\nkaggle models create -p tmp\n```\n\n**Purpose:**\n\nThis command registers a new model on Kaggle using the provided metadata. After this, you will typically create model variations and versions.\n\n## `kaggle models get`\n\nDownloads the `model-metadata.json` file for an existing model.\n\n**Usage:**\n\n```bash\nkaggle models get <MODEL> -p <FOLDER_PATH>\n```\n\n**Arguments:**\n\n*   `<MODEL>`: Model URL suffix in the format `owner/model-slug` (e.g., `$KAGGLE_DEVELOPER/test-model`).\n\n**Options:**\n\n*   `-p, --path <FOLDER_PATH>`: Folder to download the `model-metadata.json` file to.\n\n**Example:**\n\nDownload the metadata for model `$KAGGLE_DEVELOPER/test-model` into the `tmp` folder:\n\n```bash\nkaggle models get -p tmp $KAGGLE_DEVELOPER/test-model\n```\n\n**Purpose:**\n\nThis command retrieves the metadata file for an existing model, which can be useful for inspection or as a basis for an update.\n\n## `kaggle models update`\n\nUpdates an existing model on Kaggle using a local `model-metadata.json` file.\n\n**Usage:**\n\n```bash\nkaggle models update -p <FOLDER_PATH>\n```\n\n**Options:**\n\n*   `-p, --path <FOLDER_PATH>`: Path to the folder containing the `model-metadata.json` file with the updated information (defaults to the current directory).\n\n**Example:**\n\nUpdate the model whose details are in `tmp/model-metadata.json` (ensure the slug and owner in the JSON match an existing model):\n\n```bash\nkaggle models update -p tmp\n```\n\n**Purpose:**\n\nUse this command to change the metadata of an existing model, such as its title, description, or other fields defined in the `model-metadata.json` file.\n\n## `kaggle models delete`\n\nDeletes a model from Kaggle.\n\n**Usage:**\n\n```bash\nkaggle models delete <MODEL> [options]\n```\n\n**Arguments:**\n\n*   `<MODEL>`: Model URL suffix in the format `owner/model-slug` (e.g., `$KAGGLE_DEVELOPER/test-model`).\n\n**Options:**\n\n*   `-y, --yes`: Automatically confirm deletion without prompting.\n\n**Example:**\n\nDelete the model `$KAGGLE_DEVELOPER/test-model` and automatically confirm:\n\n```bash\nkaggle models delete $KAGGLE_DEVELOPER/test-model -y\n```\n\n**Purpose:**\n\nThis command permanently removes one of your models (and all its variations and versions) from Kaggle. Use with caution.\n"
  },
  {
    "path": "docs/models_metadata.md",
    "content": "A full model is composed of 3 types of entities:\n\n1. The model\n2. The variations\n3. The variation versions\n\nLet's take the example of [efficientnet](https://www.kaggle.com/models/tensorflow/efficientnet) to explain these entities.\n\nA model like `efficientnet` contains multiple variations.\n\nA variation is a specific variation of the model (e.g. B0, B1, ...) with a certain framework (e.g. TensorFlow2).\n\n## Model\n\nTo create a model, a special `model-metadata.json` file must be specified. \n\nHere's a basic example for `model-metadata.json`:\n```\n{\n  \"ownerSlug\": \"INSERT_OWNER_SLUG_HERE\",\n  \"title\": \"INSERT_TITLE_HERE\",\n  \"slug\": \"INSERT_SLUG_HERE\",\n  \"subtitle\": \"\",\n  \"isPrivate\": true,\n  \"description\": \"Model Card Markdown, see below\",\n  \"publishTime\": \"\",\n  \"provenanceSources\": \"\"\n}\n```\n\nYou can also use the API command `kaggle models init -p /path/to/model` to have the API create this file for you for a new model. If you wish to get the metadata for an existing model, you can use `kaggle models get username/model-slug`.\n\n### Contents\n\nWe currently support the following metadata fields for models.\n\n* `ownerSlug`: the slug of the user or organization\n* `title`: the model's title\n* `slug`: the model's slug (unique per owner)\n* `licenseName`: the name of the license (see the list below)\n* `subtitle`: the model's subtitle\n* `isPrivate`: whether or not the model should be private (only visible by the owners). If not specified, will be `true`\n* `description`: the model's card in markdown syntax (see the template below)\n* `publishTime`: the original publishing time of the model\n* `provenanceSources`: the provenance of the model\n\n## Model Variation\n\nTo create a model variation, a special `model-instance-metadata.json` file must be specified. \n\nHere's a basic example for `model-instance-metadata.json`:\n```\n{\n  \"ownerSlug\": \"INSERT_OWNER_SLUG_HERE\",\n  \"modelSlug\": \"INSERT_EXISTING_MODEL_SLUG_HERE\",\n  \"instanceSlug\": \"INSERT_INSTANCE_SLUG_HERE\",\n  \"framework\": \"INSERT_FRAMEWORK_HERE\",\n  \"overview\": \"\",\n  \"usage\": \"Usage Markdown, see below\",\n  \"licenseName\": \"Apache 2.0\",\n  \"fineTunable\": False,\n  \"trainingData\": [],\n  \"modelInstanceType\": \"Unspecified\",\n  \"baseModelInstance\": \"\",\n  \"externalBaseModelUrl\": \"\"\n}\n```\n\nYou can also use the API command `kaggle models variations init -p /path/to/model-variation` to have the API create this file for you for a new model variation.\n\n### Contents\n\nWe currently support the following metadata fields for model variations.\n\n* `ownerSlug`: the slug of the user or organization of the model\n* `modelSlug`: the existing model's slug\n* `instanceSlug`: the slug of the variation\n* `framework`: the variation's framework (possible options: `tensorFlow1`,`tensorFlow2`,`tfLite`,`tfJs`,`pyTorch`,`jax`,`coral`, ...)\n* `overview`: a short overview of the variation\n* `usage`: the variation's usage in markdown syntax (see the template below)\n* `fineTunable`: whether the variation is fine tunable\n* `trainingData`: a list of training data in the form of strings, URLs, Kaggle Datasets, etc...\n* `modelInstanceType`: whether the model variation is a base model, external variant, internal variant, or unspecified\n* `baseModelInstance`: if this is an internal variant, the `{owner-slug}/{model-slug}/{framework}/{variation-slug}` of the base model variation\n* `externalBaseModelUrl`: if this is an external variant, a URL to the base model\n\n### Licenses\n\nHere is a list of the available licenses for models:\n\n- Apache 2.0\n- Attribution 3.0 IGO (CC BY 3.0 IGO)\n- Attribution 3.0 Unported (CC BY 3.0)\n- Attribution 4.0 International (CC BY 4.0)\n- Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0)\n- Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)\n- Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)\n- Attribution-NonCommercial-ShareAlike 3.0 IGO (CC BY-NC-SA 3.0 IGO)\n- BSD-3-Clause\n- CC BY-NC-SA 4.0\n- CC BY-SA 3.0\n- CC BY-SA 4.0\n- CC0: Public Domain\n- Community Data License Agreement - Permissive - Version 1.0\n- Community Data License Agreement - Sharing - Version 1.0\n- GNU Affero General Public License 3.0\n- GNU Free Documentation License 1.3\n- GNU Lesser General Public License 3.0\n- GPL 2\n- MIT\n- ODC Attribution License (ODC-By)\n- ODC Public Domain Dedication and Licence (PDDL)\n- GPL 3\n\n### Usage\n\nThe following template variables can be used in this markdown: \n\n- `${VERSION_NUMBER}` is replaced by the version number when rendered\n- `${VARIATION_SLUG}` is replaced by the variation slug when rendered\n- `${FRAMEWORK}` is replaced by the framework name\n- `${PATH}` is replaced by `/kaggle/input/<model_slug>/<framework>/<variation_slug>/<version>`.\n- `${FILEPATH}` is replaced by `/kaggle/input/<model_slug>/<framework>/<variation_slug>/<version>/<filename>`. This value is only defined if the databundle contain a single file\n- `${URL}` is replaced by the absolute URL of the model"
  },
  {
    "path": "docs/tutorials.md",
    "content": "# Kaggle CLI Tutorials\n\nThese tutorials illustrate how to use a sequence of Kaggle CLI commands to accomplish common tasks.\n\n## Introduction\n\nBefore starting these tutorials, please make sure you have:\n\n1.  Installed the Kaggle CLI, following the instructions [here](./README.md#installation).\n2.  Set up your API credentials, following the instructions [here](./README.md#authentication)\n3.  Logged in to Kaggle in a web browser. This will allow you to verify the results of the CLI commands in the [`Your Work`](https://www.kaggle.com/work) section of your Kaggle profile.\n\n## Tutorial: Create a Dataset\n\nThis tutorial walks you through creating a new dataset on Kaggle.\n\n1.  **Start from an empty directory.** Create a new directory for your dataset files and navigate into it.\n\n    ```bash\n    mkdir my-new-dataset\n    cd my-new-dataset\n    ```\n\n2.  **Create a sample data file.** For this example, create a CSV file named `sample_data.csv` with an index column and three random data columns, and a few rows of data.\n\n    ```bash\n    echo \"id,col_a,col_b,col_c\" > sample_data.csv\n    echo \"1,0.5,0.2,0.8\" >> sample_data.csv\n    echo \"2,0.1,0.7,0.3\" >> sample_data.csv\n    echo \"3,0.9,0.4,0.6\" >> sample_data.csv\n    ```\n\n3.  **Initialize dataset metadata.** This creates a `dataset-metadata.json` file in your current directory.\n\n    ```bash\n    kaggle datasets init\n    ```\n\n4.  **Edit the metadata file.** Open `dataset-metadata.json` in a text editor and make the following changes:\n    *   Replace `\"INSERT_TITLE_HERE\"` with your desired dataset title, e.g., `\"My Sample Dataset\"`.\n    *   Replace `\"INSERT_SLUG_HERE\"` with a URL-friendly version of your title, e.g., `\"my-sample-dataset\"`. The URL-friendly version is made by converting the title to lower-case and changing spaces to dashes.\n    *   You can also add licenses, descriptions, and other relevant information.\n\n5.  **Create the dataset.** This command uploads your `sample_data.csv` and `dataset-metadata.json` to Kaggle.\n\n    ```bash\n    kaggle datasets create -p .\n    ```\n    You can add `--public` to make it public immediately.\n\n6.  **Verify on Kaggle.com.** Refresh the [`Datasets` tab in `Your Work`](https://www.kaggle.com/work/datasets). You should see \"My Sample Dataset\".\n\n## Tutorial: Find and Download a Dataset\n\nThis tutorial explains how to find and download using the CLI.\n\n1.  **Search for a Dataset (Optional).**\n    *   If you know the dataset you want, you can skip this step. Otherwise, you can search for datasets. For example, to search for datasets related to \"iris\":\n        ```bash\n        kaggle datasets list -s iris\n        ```\n    *   This command will list datasets matching your search query. Note the dataset's \"id\" (e.g., `uciml/iris`) which you'll use for downloading.\n\n2.  **Choose a Dataset and Create a Directory.**\n    *   For this tutorial, we'll use the classic \"Iris\" dataset, which has the id `uciml/iris`.\n    *   Create a new directory for your dataset and navigate into it:\n        ```bash\n        mkdir iris-dataset-analysis\n        cd iris-dataset-analysis\n        ```\n\n3.  **Download the Dataset.**\n    *   Use the `kaggle datasets download` command with the dataset's id.\n        ```bash\n        kaggle datasets download -d uciml/iris\n        ```\n    *   This will download the dataset files, typically as a ZIP archive (e.g., `iris.zip`), into your current directory (`iris-dataset-analysis`).\n\n4.  **Unzip the Dataset.**\n    *   Note: you could skip this step by using the `--unzip` flag on the previous command.\n    *   Most datasets are downloaded as ZIP files. You'll need to unzip the archive to access the data files (e.g., CSV files).\n        ```bash\n        # Make sure you have unzip installed, or use your OS's GUI to extract\n        # The actual zip file name might vary based on the dataset.\n        # For uciml/iris, it's iris.zip\n        unzip iris.zip\n        ```\n    \n\n5.  **Verify the results.**\n    *   After unzipping, you should see the data files (e.g., `Iris.csv`, `database.sqlite`).\n\n\n## Tutorial: Update a Kernel (Notebook)\n\nThis tutorial shows how to download an existing kernel, modify it, and push the changes back to Kaggle.\n\n1.  **Create or identify a kernel on Kaggle.com.**\n    *   Log in to kaggle.com.\n    *   Find an existing notebook you own (or create one). For this tutorial, let's assume its title is \"My CLI Test Kernel\".\n    *   Note the kernel slug from the browser's address bar. It will be something like `YOUR_USERNAME/my-cli-test-kernel`.\n\n2.  **Create a new local directory for your kernel.**\n\n    ```bash\n    mkdir my-kernel-project\n    cd my-kernel-project\n    ```\n\n3.  **Pull the kernel.** Use the `kaggle kernels pull` command with your username and the kernel slug. The `-m` flag includes the `kernel-metadata.json` file, which is required for pushing updates.\n\n    ```bash\n    # Replace YOUR_USERNAME with your actual Kaggle username\n    kaggle kernels pull YOUR_USERNAME/my-cli-test-kernel -m\n    ```\n    This will download `my-cli-test-kernel.ipynb` (or `.py`/`.Rmd`) and `kernel-metadata.json`.\n\n4.  **Edit the kernel or metadata.**\n    *   Open the downloaded notebook file (e.g., `my-cli-test-kernel.ipynb`) and make some changes to the code or content.\n    *   Open `kernel-metadata.json`. Let's add \"benchmark\" to the keywords. Find the `\"keywords\": []` line and change it to `\"keywords\": [\"benchmark\"]`.\n    *   *Note: While you can edit keywords here, it's often best to manage them on kaggle.com, as there is a restricted list of allowed keywords.*\n\n5.  **Push the kernel.** This uploads your changes and the updated metadata, then runs the kernel on Kaggle.\n\n    ```bash\n    kaggle kernels push -p .\n    ```\n\n6.  **Verify on Kaggle.com.** Refresh the [`Code` tab in `Your Work`](https://www.kaggle.com/work/code). You should see your code changes and the \"benchmark\" tag added to the kernel settings.\n\n## Tutorial: Create a Model\n\nThis tutorial guides you through creating a new model on Kaggle.\n\n1.  **Start from an empty directory.** Create a new directory for your model files and navigate into it.\n\n    ```bash\n    mkdir my-new-model\n    cd my-new-model\n    ```\n\n2.  **Copy your model definition files (optional for this step).** If you have files that define your model (e.g., Python scripts, model weights), copy them into this directory. For the `kaggle models create` step, only the metadata is strictly required, but you'll need files when you create a model variation.\n\n3.  **Initialize model metadata.** This creates a `model-metadata.json` file.\n\n    ```bash\n    kaggle models init\n    ```\n\n4.  **Edit the metadata file.** Open `model-metadata.json` and make the following changes:\n    *   Replace `\"INSERT_OWNER_SLUG_HERE\"` with your Kaggle username (e.g., `\"YOUR_USERNAME\"`).\n    *   Replace `\"INSERT_TITLE_HERE\"` with your model's title (e.g., `\"My Awesome AI Model\"`).\n    *   Replace `\"INSERT_SLUG_HERE\"` with a URL-friendly version of the title (e.g., `\"my-awesome-ai-model\"`).\n    *   Fill out the `\"description\"` field and other relevant sections like `\"licenses\"`.\n\n5.  **Create the model.**\n\n    ```bash\n    kaggle models create -p .\n    ```\n\n6.  **Verify on Kaggle.com.** Refresh the [`Models` tab in `Your Work`](https://www.kaggle.com/work/models). You should see \"My Awesome AI Model\".\n\n## Tutorial: Create a Model Variation\n\nThis tutorial shows how to create a variation under an existing model. A model variation usually represents the model implemented in a specific framework (like TensorFlow, PyTorch, JAX, etc.) and includes the actual model files.\n\n1.  **Ensure you have a parent model.** Follow the \"Create a Model\" tutorial if you haven't already. Let's assume your model slug is `my-awesome-ai-model` and your username is `YOUR_USERNAME`.\n\n2.  **Prepare your model variation files.** In your model directory (e.g., `my-new-model`), create or place the files for this specific variation. For example, a JAX model might have a `flax_model.params` file.\n\n    ```bash\n    # In the my-new-model directory\n    echo \"This is a placeholder for JAX model parameters\" > flax_model.params\n    ```\n\n3.  **Initialize model variation metadata.** This creates `model-instance-metadata.json`.\n\n    ```bash\n    # Still in the my-new-model directory\n    kaggle models variations init\n    ```\n\n4.  **Edit the variation metadata file.** Open `model-instance-metadata.json` and make changes:\n    *   Replace `\"INSERT_OWNER_SLUG_HERE\"` with your Kaggle username (e.g., `\"YOUR_USERNAME\"`).\n    *   Replace `\"INSERT_EXISTING_MODEL_SLUG_HERE\"` with your parent model's slug (e.g., `\"my-awesome-ai-model\"`).\n    *   Replace `\"INSERT_INSTANCE_SLUG_HERE\"` with a slug for this variation (e.g., `\"jax-implementation\"`).\n    *   Replace `\"INSERT_FRAMEWORK_HERE\"` with the model framework (e.g., `\"jax\"`, `\"tensorflow\"`, `\"pytorch\"`, `\"sklearn\"`).\n    *   Update the `\"instance_size_bytes\"` if known, and add a `\"description\"`.\n\n5.  **Create the model variation.** This uploads the files in the current directory (e.g., `flax_model.params`) along with the variation metadata.\n\n    ```bash\n    kaggle models variations create -p .\n    ```\n\n6.  **Verify on Kaggle.com.** Go to your model's page on Kaggle by clicking on the model under in the [`Models` tab on `Your Work`](https://www.kaggle.com/work/models). You should see a new \"jax-implementation\" variation listed, and it will have one version containing `flax_model.params`.\n\n## Tutorial: Create a Model Variation Version\n\nThis tutorial explains how to add a new version to an existing model variation, for example, when you have updated model weights or files.\n\n1.  **Ensure you have a model variation.** Follow the \"Create a Model Variation\" tutorial. Let's assume your variation is `YOUR_USERNAME/my-awesome-ai-model/jax/jax-implementation`.\n\n2.  **Prepare your updated files.** In your model variation directory (e.g., `my-new-model`), update or add new files for this version. For example, create `flax_model_v2.params`.\n\n    ```bash\n    # In the my-new-model directory\n    echo \"Updated JAX model parameters for V2\" > flax_model_v2.params\n    # You might also remove or update flax_model.params if it's being replaced\n    ```\n\n3.  **Create the new model variation version.** You need to specify the parent model variation and provide version notes. The files from the `-p` path will form the contents of this new version.\n\n    ```bash\n    # Replace YOUR_USERNAME and the slugs for model and variation accordingly\n    kaggle models variations versions create YOUR_USERNAME/my-awesome-ai-model/jax/jax-implementation -p . -n \"Second version with updated parameters\"\n    ```\n    *Note: The `-p .` means all files in the current directory will be uploaded as part of this new version. If you only want to upload `flax_model_v2.params`, ensure only it (and any other V2 files) are in a directory and point `-p` to that directory, or manage your files carefully.*\n\n4.  **Verify on Kaggle.com.** Go to your model variation page on Kaggle (e.g., `YOUR_USERNAME/my-awesome-ai-model/jax/jax-implementation`) by clicking on the [`Models` tab on `Your Work`](https://www.kaggle.com/work/models). You should see a new version (e.g., version 2) listed with your notes and the new files.\n\n## Tutorial: How to Submit to a Competition\n\nThis tutorial walks you through the process of making a submission to a Kaggle competition using the CLI.\n\n1.  **Find a Competition and Accept Rules.**\n    *   First, you need to find a competition. You can list active competitions using `kaggle competitions list`.\n    *   For this tutorial, we'll use the \"titanic\" competition, which is a common starting point. You can find it at [`https://www.kaggle.com/c/titanic`](https://www.kaggle.com/c/titanic).\n    *   **Important**: Before you can download data or submit, you *must* join the competition and accept the competition's rules on the Kaggle website. Navigate to the competition on kaggle.com to do this.\n\n2.  **Create a Directory and Download Competition Files.**\n    *   Create a new directory for your competition files and navigate into it.\n        ```bash\n        mkdir titanic-competition\n        cd titanic-competition\n        ```\n    *   Download the competition files. This usually includes training data, test data, and a sample submission file.\n        ```bash\n        kaggle competitions download -c titanic\n        ```\n    *   This will download `titanic.zip`. You'll need to unzip it to see the files (e.g., `train.csv`, `test.csv`, `gender_submission.csv`).\n        ```bash\n        # Make sure you have unzip installed, or use your OS's GUI to extract\n        # The actual zip file name might vary based on the competition.\n        unzip titanic.zip\n        ```\n\n3.  **Create Your Submission File.**\n    *   The required format for the submission file is specific to each competition. You can find this information on the competition's \"Evaluation\" page or by examining the sample submission file (e.g., `gender_submission.csv` for the Titanic competition).\n    *   For the Titanic competition, the submission file needs two columns: `PassengerId` and `Survived`. The `Survived` column should contain your predictions (0 for deceased, 1 for survived).\n    *   Let's create a very simple submission file based on the `gender_submission.csv` (which predicts survival based on gender). For this tutorial, we'll just copy it and use it as our submission. In a real scenario, you would generate this file from your model's predictions on the `test.csv` data.\n        ```bash\n        cp gender_submission.csv my_submission.csv\n        ```\n    *   Your `my_submission.csv` should look something like this:\n        ```\n        PassengerId,Survived\n        892,0\n        893,1\n        894,0\n        ...\n        ```\n\n4.  **Submit to the Competition.**\n    *   Use the `kaggle competitions submit` command. You need to specify:\n        *   The competition ID (`titanic`).\n        *   The path to your submission file (`-f my_submission.csv`).\n        *   A message describing your submission (`-m \"My first submission via CLI\"`).\n        ```bash\n        kaggle competitions submit titanic -f my_submission.csv -m \"My first submission via CLI\"\n        ```\n\n5.  **Check Your Submission Status.**\n    *   After submitting, you'll get a message indicating success or failure.\n    *   You can check your submission's score and status on the \"My Submissions\" tab of the competition page on Kaggle.com (e.g., [`https://www.kaggle.com/c/titanic/submissions`](https://www.kaggle.com/c/titanic/submissions)).\n    *   You can also list your recent submissions and their scores via the CLI:\n        ```bash\n        kaggle competitions submissions -c titanic\n        ```\n    *   This command will show your submission, its status (e.g., `complete`, `error`), and your public/private scores if available.\n\n\n## Tutorial: How to Submit to a Code Competition\n\nThis tutorial walks you through the process of submitting to a code competition on Kaggle.\n\n1.  **Find a Code Competition.**\n\n    *   First, you need to find a code competition to participate in. You can browse the available competitions on the [Kaggle competitions page](https://www.kaggle.com/competitions). Many Featured Competitions are code competitions.\n\n2.  **Download the Dataset.**\n\n    *   Once you have chosen a competition, you need to download the dataset. You can do this using the `kaggle competitions download` command:\n    ```bash\n    kaggle competitions download -c <competition-name>\n    ```\n    *   Replace `<competition-name>` with the name of the competition you want to participate in.\n\n3.  **Create a Notebook.**\n\n    *   Next, you need to create a Kaggle Notebook to work on your submission. A Kaggle Notebook contains the code and environment settings for Kaggle to run and evaluate your submission.  Follow the tutorial on [Creating / Updating Notebooks](#tutorial-update-a-kernel-notebook) if you're not sure how to do this.\n\n4.  **Write Your Code.**\n\n    *   Now it's time to write your code! You can use any programming language or framework that is supported by Kaggle. The goal is to create a model that can make predictions on the test set.\n\n5.  **Submit Your Prediction.**\n\n    *   Once you are happy with your model, you can submit your prediction to the competition. You can do this using the `kaggle competitions submit` command:\n    ```bash\n    kaggle competitions submit <competition-name> -k <username>/<notebook-slug> -f <output-filename> -v <notebook-version> -m <message>\n    ```\n    *   Replace:\n      * `<competition-name>` with the name of the competition\n      * `<username>/<notebook-slug>` with the identifier of your notebook\n      * `<output-filename>` with the name of the submission file produced by your notebook (e.g. `submission.csv`).\n      * `<notebook-version>` with the version to submit (e.g. `3` to submit the 3rd version of your notebook).\n      * `<message>` with a brief description of your submission.\n\n6.  **Check Your Score.**\n\n    *   After you have submitted your prediction, you can check your score on the competition leaderboard. The leaderboard shows the scores of all the participants in the competition.  You can download the leaderboard using the `kaggle competitions leaderboard` command:\n    ```bash\n    kaggle competitions leaderboard <competition-name>\n    ```\n\n"
  },
  {
    "path": "integration_tests/__init__.py",
    "content": ""
  },
  {
    "path": "integration_tests/test_models.py",
    "content": "import unittest\n\nfrom kaggle.api.kaggle_api_extended import KaggleApi\n\nMODEL_HANDLE = \"keras/bert\"\nMODEL_ID = 2819\n\n# TODO(messick) Add a test that creates a dataset w/o specifying privacy that is created private.\n\n\nclass TestModels(unittest.TestCase):\n    def setUp(self):\n        self.api = KaggleApi()\n        self.api.authenticate()\n\n    def test_list_models(self) -> None:\n        models = self.api.model_list()\n        self.assertGreater(len(models), 0)\n\n    def test_get_model(self) -> None:\n        model = self.api.model_get(MODEL_HANDLE)\n        self.assertEqual(MODEL_ID, model.id)\n"
  },
  {
    "path": "pyproject.toml",
    "content": "[build-system]\nrequires = [\n    \"hatchling\",\n]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"kaggle\"\ndynamic = [\n    \"version\",\n]\ndescription = \"Access Kaggle resources anywhere\"\nauthors = [\n    { name = \"Kaggle\", email = \"support@kaggle.com\" },\n]\nlicense = { file = \"LICENSE.txt\" }\nreadme = \"README.md\"\nclassifiers = [\n    \"Programming Language :: Python :: 3\",\n    \"License :: OSI Approved :: Apache Software License\",\n    \"Operating System :: OS Independent\",\n]\nkeywords = [\"Kaggle\", \"API\"]\nrequires-python = \">= 3.11\"\ndependencies = [\n    \"bleach\",\n    \"kagglesdk >= 0.1.16, < 1.0\", # sync with kagglehub\n    \"python-slugify\",\n    \"requests\",\n    \"python-dateutil\",\n    \"tqdm\",\n    \"urllib3 >= 1.15.1\",\n    \"packaging\",\n    \"protobuf\",\n]\n\n[project.scripts]\nkaggle = \"kaggle.cli:main\"\n\n[project.urls]\nHomepage = \"https://github.com/Kaggle/kaggle-cli\"\nIssues = \"https://github.com/Kaggle/kaggle-cli/issues\"\n\n[tool.hatch.version]\npath = \"src/kaggle/__init__.py\"\n\n[tool.hatch.build.targets.wheel]\npackages = [\"src/kaggle\"]\n\n[tool.hatch.envs.test]\ndependencies = [\n    \"pytest\"\n]\n\n[tool.hatch.envs.test.scripts]\nlocal = \"source tools/use-localhost.sh; cd tests; python unit_tests.py --failfast\"\nprod = \"source tools/use-prod.sh; cd tests; python unit_tests.py --failfast\"\nintegration = \"pytest integration_tests\"\n\n[tool.hatch.envs.lint]\ndetached = true\ndependencies = [\n    \"black >= 24.10.0\",\n    \"mypy >= 1.15.0\",\n    # Pre-install `types-*` packages to speed up lint:typing command.\n    \"types-requests\",\n    \"types-tqdm\",\n]\n\n[tool.hatch.envs.lint.scripts]\ntyping = \"mypy --install-types --non-interactive {args:src/kagglehub tests}\"\nstyle = [\n  \"black --check --diff {args:.}\",\n]\nfmt = [\n  \"black {args:.}\",\n  \"style\",\n]\nall = [\n  \"style\",\n  \"typing\",\n]\n\n[tool.docformatter]\nrecursive = true\n\n[tool.black]\ntarget-version = [\"py311\"]\nline-length = 120\n\n[tool.mypy]\nstrict = false\nshow_error_codes = true\nfollow_imports = 'silent'\nexclude = '''(?x)(\n    /src/\n)'''\npython_version = 3.11\n\n# Start off with these\nwarn_unused_configs = true\nwarn_redundant_casts = true\nwarn_unused_ignores = true\n\n# Getting these passing should be easy\nstrict_equality = true\nextra_checks = true\n\n# Strongly recommend enabling this one as soon as you can\ncheck_untyped_defs = true\n\n# These shouldn't be too much additional work, but may be tricky to\n# get passing if you use a lot of untyped libraries\ndisallow_subclassing_any = true\ndisallow_untyped_decorators = true\ndisallow_any_generics = true\n\n# These next few are various gradations of forcing use of type annotations\ndisallow_incomplete_defs = true\n# TODO Enable these after GA.\n#disallow_untyped_calls = true # 167 errors reported a/o April 30, 2025\n#disallow_untyped_defs = true # 132\n\n# This one isn't too hard to get passing, but return on investment is lower\nno_implicit_reexport = true # 50\n\n# This one can be tricky to get passing if you use a lot of untyped libraries\nwarn_return_any = true\n"
  },
  {
    "path": "tests/__init__.py",
    "content": ""
  },
  {
    "path": "tests/dataset/data.csv",
    "content": "id, fruit\n1, apple\n2, banana\n3, citrus\n4, apple\n5, durian"
  },
  {
    "path": "tests/kernel/testing-x.ipynb",
    "content": "{\"metadata\":{\"kernelspec\":{\"language\":\"python\",\"display_name\":\"Python 3\",\"name\":\"python3\"},\"language_info\":{\"name\":\"python\",\"version\":\"3.10.13\",\"mimetype\":\"text/x-python\",\"codemirror_mode\":{\"name\":\"ipython\",\"version\":3},\"pygments_lexer\":\"ipython3\",\"nbconvert_exporter\":\"python\",\"file_extension\":\".py\"},\"kaggle\":{\"accelerator\":\"none\",\"dataSources\":[],\"dockerImageVersionId\":30646,\"isInternetEnabled\":true,\"language\":\"python\",\"sourceType\":\"notebook\",\"isGpuEnabled\":false}},\"nbformat_minor\":4,\"nbformat\":4,\"cells\":[{\"cell_type\":\"code\",\"source\":\"# This Python 3 environment comes with many helpful analytics libraries installed\\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\\n# For example, here's several helpful packages to load\\n\\nimport numpy as np # linear algebra\\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\\n\\n# Input data files are available in the read-only \\\"../input/\\\" directory\\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\\n\\nimport os\\nfor dirname, _, filenames in os.walk('/kaggle/input'):\\n    for filename in filenames:\\n        print(os.path.join(dirname, filename))\\n\\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \\\"Save & Run All\\\" \\n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session\",\"metadata\":{\"_uuid\":\"8f2839f25d086af736a60e9eeb907d3b93b6e0e5\",\"_cell_guid\":\"b1076dfc-b9ad-4769-8c92-a6c4dae69d19\",\"execution\":{\"iopub.status.busy\":\"2024-06-11T17:18:41.771461Z\",\"iopub.execute_input\":\"2024-06-11T17:18:41.771892Z\",\"iopub.status.idle\":\"2024-06-11T17:18:43.04124Z\",\"shell.execute_reply.started\":\"2024-06-11T17:18:41.771858Z\",\"shell.execute_reply\":\"2024-06-11T17:18:43.03999Z\"},\"trusted\":true},\"execution_count\":null,\"outputs\":[]}]}"
  },
  {
    "path": "tests/model/instance/data.csv",
    "content": "id, fruit\n1, apple\n2, banana\n3, citrus\n4, apple\n5, durian"
  },
  {
    "path": "tests/model/instance/version/metadata.json",
    "content": "{}"
  },
  {
    "path": "tests/sample_submission.csv",
    "content": "Id,SalePrice\n1461,169277.0524984\n1462,187758.393988768\n1463,183583.683569555\n1464,179317.47751083\n1465,150730.079976501\n1466,177150.989247307\n1467,172070.659229164\n1468,175110.956519547\n1469,162011.698831665\n1470,160726.247831419\n1471,157933.279456005\n1472,145291.245020389\n1473,159672.017631819\n1474,164167.518301885\n1475,150891.638244053\n1476,179460.96518734\n1477,185034.62891405\n1478,182352.192644656\n1479,183053.458213802\n1480,187823.339254278\n1481,186544.114327568\n1482,158230.77520516\n1483,190552.829321091\n1484,147183.67487199\n1485,185855.300905493\n1486,174350.470676986\n1487,201740.620690863\n1488,162986.378895754\n1489,162330.199085679\n1490,165845.938616539\n1491,180929.622876974\n1492,163481.501519718\n1493,187798.076714233\n1494,198822.198942566\n1495,194868.409899858\n1496,152605.298564403\n1497,147797.702836811\n1498,150521.96899297\n1499,146991.630153739\n1500,150306.307814534\n1501,151164.372534604\n1502,151133.706960953\n1503,156214.042540726\n1504,171992.760735142\n1505,173214.912549738\n1506,192429.187345783\n1507,190878.69508543\n1508,194542.544135519\n1509,191849.439072822\n1510,176363.773907793\n1511,176954.185412429\n1512,176521.216975696\n1513,179436.704810176\n1514,220079.756777048\n1515,175502.918109444\n1516,188321.073833569\n1517,163276.324450004\n1518,185911.366293097\n1519,171392.830997252\n1520,174418.207020775\n1521,179682.709603774\n1522,179423.751581665\n1523,171756.918091777\n1524,166849.638174419\n1525,181122.168676666\n1526,170934.462746566\n1527,159738.292580329\n1528,174445.759557658\n1529,174706.363659627\n1530,164507.672539365\n1531,163602.512172832\n1532,154126.270249525\n1533,171104.853481351\n1534,167735.39270528\n1535,183003.613338104\n1536,172580.381161499\n1537,165407.889104689\n1538,176363.773907793\n1539,175182.950898522\n1540,190757.177789246\n1541,167186.995771991\n1542,167839.376779276\n1543,173912.421165137\n1544,154034.917445551\n1545,156002.955794336\n1546,168173.94329857\n1547,168882.437104132\n1548,168173.94329857\n1549,157580.177551642\n1550,181922.15256011\n1551,155134.227842592\n1552,188885.573319552\n1553,183963.193012381\n1554,161298.762306335\n1555,188613.66763056\n1556,175080.111822945\n1557,174744.400305232\n1558,168175.911336919\n1559,182333.472575006\n1560,158307.206742274\n1561,193053.055502348\n1562,175031.089987177\n1563,160713.294602908\n1564,173186.215014436\n1565,191736.7598055\n1566,170401.630997116\n1567,164626.577880222\n1568,205469.409444832\n1569,209561.784211885\n1570,182271.503072356\n1571,178081.549427793\n1572,178425.956138831\n1573,162015.318511503\n1574,181722.420373045\n1575,156705.730169433\n1576,182902.420342386\n1577,157574.595395085\n1578,184380.739100813\n1579,169364.469225677\n1580,175846.179822063\n1581,189673.295302136\n1582,174401.317715566\n1583,179021.448718583\n1584,189196.845337149\n1585,139647.095720655\n1586,161468.198288911\n1587,171557.32317862\n1588,179447.36804185\n1589,169611.619017694\n1590,172088.872655744\n1591,171190.624128768\n1592,154850.508361878\n1593,158617.655719941\n1594,209258.33693701\n1595,177939.027626751\n1596,194631.100299584\n1597,213618.871562568\n1598,198342.504228533\n1599,138607.971472497\n1600,150778.958976731\n1601,146966.230339786\n1602,162182.59620952\n1603,176825.940961269\n1604,152799.812402444\n1605,180322.322067129\n1606,177508.027228367\n1607,208029.642652019\n1608,181987.282510201\n1609,160172.72797397\n1610,176761.317654248\n1611,176515.497545231\n1612,176270.453065471\n1613,183050.846258475\n1614,150011.102062216\n1615,159270.537808667\n1616,163419.663729346\n1617,163399.983345859\n1618,173364.161505756\n1619,169556.835902417\n1620,183690.595995738\n1621,176980.914909382\n1622,204773.36222471\n1623,174728.655998442\n1624,181873.458244461\n1625,177322.000823979\n1626,193927.939041863\n1627,181715.622732304\n1628,199270.841200324\n1629,177109.589956218\n1630,153909.578271486\n1631,162931.203336223\n1632,166386.7567182\n1633,173719.30379824\n1634,179757.925656704\n1635,179007.601964376\n1636,180370.808623106\n1637,185102.616730563\n1638,198825.563452058\n1639,184294.576009142\n1640,200443.7920562\n1641,181294.784484153\n1642,174354.336267919\n1643,172023.677781517\n1644,181666.922855025\n1645,179024.491269586\n1646,178324.191575907\n1647,184534.676687694\n1648,159397.250378784\n1649,178430.966728182\n1650,177743.799385967\n1651,179395.305519087\n1652,151713.38474815\n1653,151713.38474815\n1654,168434.977996215\n1655,153999.100311019\n1656,164096.097354123\n1657,166335.403036551\n1658,163020.725375757\n1659,155862.510668829\n1660,182760.651095509\n1661,201912.270622883\n1662,185988.233987516\n1663,183778.44888032\n1664,170935.85921771\n1665,184468.908382254\n1666,191569.089663229\n1667,232991.025583822\n1668,180980.721388278\n1669,164279.13048219\n1670,183859.460411109\n1671,185922.465682076\n1672,191742.778119363\n1673,199954.072465842\n1674,180690.274752587\n1675,163099.3096358\n1676,140791.922472443\n1677,166481.86647592\n1678,172080.434496773\n1679,191719.161659178\n1680,160741.098612515\n1681,157829.546854733\n1682,196896.748596341\n1683,159675.423990355\n1684,182084.790901946\n1685,179233.926374487\n1686,155774.270901623\n1687,181354.326716058\n1688,179605.563663918\n1689,181609.34866147\n1690,178221.531623281\n1691,175559.920735795\n1692,200328.822792041\n1693,178630.060559899\n1694,177174.535221728\n1695,172515.687368714\n1696,204032.992922943\n1697,176023.232787689\n1698,202202.073341595\n1699,181734.480075862\n1700,183982.158993126\n1701,188007.94241481\n1702,185922.966763517\n1703,183978.544874918\n1704,177199.618638821\n1705,181878.647956764\n1706,173622.088728263\n1707,180728.168562655\n1708,176477.026606328\n1709,184282.266697609\n1710,162062.47538448\n1711,182550.070992189\n1712,180987.949624695\n1713,178173.79762147\n1714,179980.635948606\n1715,173257.637826205\n1716,177271.291059307\n1717,175338.355442312\n1718,177548.140549508\n1719,175969.91662932\n1720,175011.481953462\n1721,185199.372568143\n1722,188514.050228937\n1723,185080.145268797\n1724,157304.402574096\n1725,194260.859481297\n1726,181262.329995106\n1727,157003.292706732\n1728,182924.499359899\n1729,181902.586375439\n1730,188985.371708134\n1731,185290.904495068\n1732,177304.425752748\n1733,166274.900490809\n1734,177807.420530107\n1735,180330.624816201\n1736,179069.112234629\n1737,175943.371816948\n1738,185199.050609653\n1739,167350.910824524\n1740,149315.311876449\n1741,139010.847766793\n1742,155412.151845447\n1743,171308.313985441\n1744,176220.543265638\n1745,177643.434991809\n1746,187222.653264601\n1747,185635.132083154\n1748,206492.534215854\n1749,181681.021081956\n1750,180500.198072685\n1751,206486.17086841\n1752,161334.301195429\n1753,176156.558313965\n1754,191642.223478994\n1755,191945.808027777\n1756,164146.306037354\n1757,179883.057071096\n1758,178071.137668844\n1759,188241.637896875\n1760,174559.656173171\n1761,182347.363042264\n1762,191507.251872857\n1763,199751.865597358\n1764,162106.416145131\n1765,164575.982314367\n1766,179176.352180931\n1767,177327.403857584\n1768,177818.083761781\n1769,186965.204048443\n1770,178762.742169197\n1771,183322.866146283\n1772,178903.295931891\n1773,186570.129421778\n1774,199144.242829024\n1775,172154.713310956\n1776,177444.019201603\n1777,166200.938073485\n1778,158995.770555632\n1779,168273.282454755\n1780,189680.453052788\n1781,181681.021081956\n1782,160277.142643643\n1783,197318.54715833\n1784,162228.935604196\n1785,187340.455456083\n1786,181065.347037275\n1787,190233.609102705\n1788,157929.594852031\n1789,168557.001935469\n1790,160805.584645628\n1791,221648.391978216\n1792,180539.88079815\n1793,182105.616283853\n1794,166380.852603154\n1795,178942.155617426\n1796,162804.747800461\n1797,183077.684392615\n1798,171728.4720292\n1799,164786.741540638\n1800,177427.267170302\n1801,197318.54715833\n1802,178658.114178223\n1803,185437.320523764\n1804,169759.652489529\n1805,173986.635055186\n1806,168607.664289468\n1807,194138.519145183\n1808,192502.440921994\n1809,176746.969818601\n1810,177604.891703134\n1811,193283.746584832\n1812,181627.061006609\n1813,169071.62025834\n1814,167398.006470987\n1815,150106.505141704\n1816,159650.304285848\n1817,179471.23597476\n1818,177109.589956218\n1819,166558.113328453\n1820,153796.714319583\n1821,174520.152570658\n1822,196297.95829524\n1823,169100.681601175\n1824,176911.319164431\n1825,169234.6454828\n1826,172386.297919134\n1827,156031.904802362\n1828,168202.892306596\n1829,166505.984017547\n1830,176507.37022149\n1831,180116.752553161\n1832,183072.740591406\n1833,189595.964677698\n1834,167523.919076265\n1835,210817.775863413\n1836,172942.930813351\n1837,145286.278144089\n1838,176468.653371492\n1839,159040.069562187\n1840,178518.204332507\n1841,169163.980786825\n1842,189786.685274579\n1843,181246.728523853\n1844,176349.927153587\n1845,205266.631009142\n1846,187397.993362224\n1847,208943.427726113\n1848,165014.532907657\n1849,182492.037566236\n1850,161718.71259042\n1851,180084.118941162\n1852,178534.950802179\n1853,151217.259961305\n1854,156342.717587562\n1855,188511.443835239\n1856,183570.337896789\n1857,225810.160292177\n1858,214217.401131694\n1859,187665.64101603\n1860,161157.177744039\n1861,187643.992594193\n1862,228156.372839158\n1863,220449.534665317\n1864,220522.352084222\n1865,156647.763531624\n1866,187388.833374873\n1867,178640.723791573\n1868,180847.216739049\n1869,159505.170529478\n1870,164305.538020654\n1871,180181.19673723\n1872,184602.734989972\n1873,193440.372174434\n1874,184199.788209911\n1875,196241.892907637\n1876,175588.618271096\n1877,179503.046546829\n1878,183658.076582555\n1879,193700.976276404\n1880,165399.62450704\n1881,186847.944787446\n1882,198127.73287817\n1883,183320.898107934\n1884,181613.606696657\n1885,178298.791761954\n1886,185733.534000593\n1887,180008.188485489\n1888,175127.59621604\n1889,183467.176862723\n1890,182705.546021743\n1891,152324.943593181\n1892,169878.515981342\n1893,183735.975076576\n1894,224118.280105941\n1895,169355.202465146\n1896,180054.276407441\n1897,174081.601977368\n1898,168494.985022146\n1899,181871.598843299\n1900,173554.489658383\n1901,169805.382165577\n1902,176192.990728755\n1903,204264.39284654\n1904,169630.906956928\n1905,185724.838807268\n1906,195699.036281861\n1907,189494.276162169\n1908,149607.905673439\n1909,154650.199045978\n1910,151579.558140433\n1911,185147.380531144\n1912,196314.53120359\n1913,210802.395364155\n1914,166271.2863726\n1915,154865.359142973\n1916,173575.5052865\n1917,179399.563554274\n1918,164280.776562049\n1919,171247.48948121\n1920,166878.587182445\n1921,188129.459710994\n1922,183517.34369691\n1923,175522.026925727\n1924,190060.105331152\n1925,174179.824771856\n1926,171059.523675194\n1927,183004.186769318\n1928,183601.647387418\n1929,163539.327185998\n1930,164677.676391525\n1931,162395.073865424\n1932,182207.6323195\n1933,192223.939790304\n1934,176391.829390125\n1935,181913.179121348\n1936,179136.097888261\n1937,196595.568243212\n1938,194822.365690957\n1939,148356.669440918\n1940,160387.604263899\n1941,181276.500571809\n1942,192474.817899346\n1943,157699.907796437\n1944,215785.540813051\n1945,181824.300998793\n1946,221813.00948166\n1947,165281.292597397\n1948,255629.49047034\n1949,173154.590990955\n1950,183884.65246539\n1951,200210.353608489\n1952,186599.221265342\n1953,192718.532696106\n1954,178628.665952764\n1955,180650.342418406\n1956,206003.107947263\n1957,166457.67844853\n1958,202916.221653487\n1959,192463.969983091\n1960,171775.497189898\n1961,175249.222149411\n1962,147086.59893993\n1963,149709.672100371\n1964,171411.404533743\n1965,178188.964799425\n1966,156491.711373235\n1967,180953.241201168\n1968,203909.759061135\n1969,175470.149087545\n1970,205578.333622415\n1971,199428.857699441\n1972,187599.163869476\n1973,192265.198109864\n1974,196666.554897677\n1975,155537.862252682\n1976,169543.240620935\n1977,202487.010170501\n1978,208232.716273485\n1979,173621.195202569\n1980,172414.608571812\n1981,164400.75641556\n1982,160480.424024781\n1983,156060.853810389\n1984,157437.192820581\n1985,158163.720929772\n1986,154849.043268978\n1987,152186.609341561\n1988,180340.215399228\n1989,178344.62451356\n1990,190170.382266827\n1991,168092.975480832\n1992,178757.912566805\n1993,174518.256882082\n1994,198168.490116289\n1995,176882.693978902\n1996,183801.672896251\n1997,196400.046680661\n1998,172281.605004025\n1999,196380.366297173\n2000,198228.354306682\n2001,195556.581268962\n2002,186453.264469043\n2003,181869.381196234\n2004,175610.840124147\n2005,183438.730800145\n2006,179584.488673295\n2007,182386.152242034\n2008,160750.367237054\n2009,182477.505046008\n2010,187720.359207171\n2011,187201.942081511\n2012,176385.102235149\n2013,175901.787841278\n2014,182584.280198283\n2015,195664.686104237\n2016,181420.346494222\n2017,176676.04995228\n2018,181594.678867334\n2019,178521.747964951\n2020,175895.883726231\n2021,168468.005916477\n2022,200973.129447888\n2023,197030.641992202\n2024,192867.417844592\n2025,196449.247639381\n2026,141684.196398607\n2027,153353.334123901\n2028,151143.549016705\n2029,163753.087114229\n2030,158682.460013921\n2031,144959.835250915\n2032,160144.390548579\n2033,156286.534303521\n2034,165726.707619571\n2035,182427.481047359\n2036,173310.56154032\n2037,173310.56154032\n2038,151556.01403002\n2039,158908.146068683\n2040,209834.383092536\n2041,192410.516550815\n2042,174026.247294886\n2043,195499.830115336\n2044,200918.018812493\n2045,207243.616023976\n2046,196149.783851876\n2047,192097.914850217\n2048,178570.948923671\n2049,228617.968325428\n2050,199929.884438451\n2051,160206.365612859\n2052,179854.431885567\n2053,185987.340461822\n2054,161122.505607926\n2055,175949.342720138\n2056,183683.590595324\n2057,176401.34762338\n2058,205832.532527897\n2059,177799.799849436\n2060,167565.362080406\n2061,186348.958436557\n2062,179782.759465081\n2063,169837.623333323\n2064,178817.275675758\n2065,174444.479149339\n2066,192834.968917174\n2067,196564.717984981\n2068,206977.567039357\n2069,157054.253944128\n2070,175142.948078577\n2071,159932.1643654\n2072,182801.408333628\n2073,181510.375176825\n2074,181613.035129451\n2075,186920.512597635\n2076,157950.170625222\n2077,176115.159022876\n2078,182744.514344465\n2079,180660.683691591\n2080,160775.629777099\n2081,186711.715848082\n2082,223581.758190888\n2083,172330.943236652\n2084,163474.633393212\n2085,175308.263299874\n2086,187462.725306432\n2087,180655.101535034\n2088,152121.98603454\n2089,159856.233909727\n2090,186559.854936737\n2091,183962.550959411\n2092,162107.168699296\n2093,162582.288981283\n2094,154407.701597409\n2095,181625.666399474\n2096,164810.609473548\n2097,176429.401241704\n2098,179188.089925259\n2099,145997.635377703\n2100,218676.768270367\n2101,188323.861214226\n2102,168690.0722914\n2103,165088.746797705\n2104,191435.007885166\n2105,168864.404664512\n2106,176041.882371574\n2107,215911.674390325\n2108,167388.238629016\n2109,163854.786753017\n2110,163299.477980171\n2111,178298.214633119\n2112,176376.586164775\n2113,170211.043976522\n2114,170818.344786366\n2115,174388.867432503\n2116,161112.987374671\n2117,172179.082325307\n2118,157798.309713876\n2119,169106.151422924\n2120,170129.531364292\n2121,157680.227412949\n2122,162690.209131977\n2123,146968.379365095\n2124,181507.721372455\n2125,191215.589752983\n2126,189432.689844522\n2127,207271.484957719\n2128,170030.807488363\n2129,148409.806476335\n2130,193850.613979055\n2131,193808.319298263\n2132,166300.235380627\n2133,163474.633393212\n2134,177473.606564978\n2135,157443.925537187\n2136,180681.007992057\n2137,183463.17030026\n2138,182481.763081195\n2139,193717.15117887\n2140,182782.55099007\n2141,175530.651633287\n2142,177804.057884623\n2143,159448.670848577\n2144,181338.976717529\n2145,178553.558537021\n2146,162820.928264556\n2147,188832.479997186\n2148,164682.185899437\n2149,181549.735943801\n2150,199158.097008868\n2151,152889.520990566\n2152,181150.551679116\n2153,181416.732376013\n2154,164391.238182305\n2155,185421.046498812\n2156,193981.327550004\n2157,178824.324789223\n2158,209270.051606246\n2159,177801.266806344\n2160,179053.762236101\n2161,178762.170601992\n2162,184655.300458183\n2163,191284.655779772\n2164,179598.085818785\n2165,167517.628078595\n2166,182873.903794044\n2167,177484.91371363\n2168,188444.597319524\n2169,179184.153848562\n2170,184365.175780982\n2171,184479.322005212\n2172,182927.863869391\n2173,178611.639373646\n2174,181943.343613558\n2175,175080.614768394\n2176,190720.794649138\n2177,198422.868144723\n2178,184482.11308349\n2179,139214.952187861\n2180,169233.113601757\n2181,180664.118686848\n2182,178818.742632666\n2183,180422.049969947\n2184,178601.93645581\n2185,183083.159775993\n2186,173163.101499699\n2187,185968.161159774\n2188,171226.050683054\n2189,281643.976116786\n2190,160031.711281258\n2191,162775.979779394\n2192,160735.445970193\n2193,166646.109048572\n2194,188384.548444549\n2195,165830.697255197\n2196,182138.358533039\n2197,171595.397975647\n2198,160337.079183809\n2199,191215.088671543\n2200,166956.093232213\n2201,186581.830878692\n2202,176450.548582099\n2203,193743.194909801\n2204,198882.566078408\n2205,176385.102235149\n2206,162447.639333636\n2207,193782.555676777\n2208,183653.890897141\n2209,210578.623546866\n2210,158527.164107319\n2211,163081.025723456\n2212,174388.867432503\n2213,191905.870131966\n2214,174388.867432503\n2215,161642.711648983\n2216,186939.507215101\n2217,172482.165792649\n2218,159695.999763546\n2219,157230.369671007\n2220,179188.089925259\n2221,157972.82120994\n2222,156804.951429181\n2223,211491.972463654\n2224,186537.246201062\n2225,200468.161070551\n2226,182241.340444154\n2227,157342.225898399\n2228,182022.387105998\n2229,181244.510876788\n2230,178556.671573788\n2231,189547.199876284\n2232,187948.65165563\n2233,194107.287565956\n2234,183521.710369283\n2235,183682.123638416\n2236,178483.353073443\n2237,184003.879764736\n2238,171318.59033449\n2239,162039.754313997\n2240,154846.252190699\n2241,194822.365690957\n2242,169788.738771463\n2243,178891.554489941\n2244,152084.772428865\n2245,139169.86642879\n2246,192439.536044606\n2247,161067.859766557\n2248,158762.648504781\n2249,175569.690441774\n2250,183659.795012187\n2251,280618.132617258\n2252,180051.809151659\n2253,176519.18031559\n2254,179028.429210291\n2255,177161.583857224\n2256,180081.508849842\n2257,205895.254584712\n2258,183389.78131415\n2259,178543.647859512\n2260,194798.320499104\n2261,162845.613675766\n2262,148103.867006579\n2263,201016.171121215\n2264,277936.12694354\n2265,249768.279823405\n2266,161596.052159825\n2267,158011.114889899\n2268,194089.683858004\n2269,181733.336941451\n2270,182852.32772198\n2271,189893.003058465\n2272,194650.210979875\n2273,187904.461286262\n2274,171774.925622692\n2275,177998.685921479\n2276,175648.484325498\n2277,196918.071362067\n2278,184299.838071218\n2279,182379.855682734\n2280,184050.725802482\n2281,158296.975970284\n2282,175053.355553278\n2283,162293.376090644\n2284,186328.880047186\n2285,151422.116936538\n2286,181969.358707768\n2287,189122.67702416\n2288,185645.475220346\n2289,182829.898109257\n2290,195848.788183328\n2291,198785.059550672\n2292,181676.126555428\n2293,194131.012663328\n2294,201416.004864508\n2295,185096.577205616\n2296,195158.972598372\n2297,184795.783735112\n2298,189168.263864671\n2299,216855.260149095\n2300,184946.642483576\n2301,189317.51282069\n2302,180803.277842406\n2303,175061.18585763\n2304,179074.839090732\n2305,145708.764336107\n2306,142398.022752011\n2307,161474.534863641\n2308,157025.945155458\n2309,163424.037827357\n2310,164692.778645345\n2311,152163.2443541\n2312,192383.215486656\n2313,182520.230322476\n2314,187254.507549722\n2315,176489.659740359\n2316,181520.466841293\n2317,186414.978214721\n2318,185197.764639705\n2319,178657.794083741\n2320,179731.198023759\n2321,161748.271317074\n2322,158608.749069322\n2323,178807.370559878\n2324,184187.158803897\n2325,181686.10402108\n2326,190311.050228337\n2327,192252.496354076\n2328,193954.849525775\n2329,181044.201560887\n2330,180258.131219792\n2331,199641.657313834\n2332,197530.775205517\n2333,191777.196949138\n2334,195779.543033588\n2335,202112.046522999\n2336,192343.34807661\n2337,185191.359443218\n2338,186760.207965688\n2339,177733.78193528\n2340,164430.391189608\n2341,185299.601552401\n2342,186414.012339254\n2343,176401.921054593\n2344,182381.322639642\n2345,176334.184710805\n2346,184901.735847457\n2347,180085.766885029\n2348,184901.735847457\n2349,183967.561548763\n2350,193046.301574659\n2351,168538.969495849\n2352,170157.842016969\n2353,196559.709259637\n2354,177133.709361852\n2355,181553.279576244\n2356,185770.606634739\n2357,177017.595099274\n2358,184123.358536806\n2359,165970.357492196\n2360,158151.985049452\n2361,177086.476441481\n2362,196373.896176551\n2363,172465.707083115\n2364,168590.782409896\n2365,158820.474171061\n2366,151611.37057651\n2367,152125.028585543\n2368,158404.073081048\n2369,160692.078640755\n2370,170175.22684199\n2371,169854.436591138\n2372,183410.785819008\n2373,180347.194026928\n2374,178930.528374292\n2375,153346.220086301\n2376,182675.204270589\n2377,180770.649792036\n2378,188714.148087543\n2379,191393.608594076\n2380,174016.157494425\n2381,183189.685319552\n2382,183621.508757866\n2383,168991.29635758\n2384,185306.650665866\n2385,189030.680303208\n2386,179208.665698449\n2387,174901.452792889\n2388,168337.406544343\n2389,158234.96461859\n2390,179562.453368834\n2391,174176.391640607\n2392,173931.531845427\n2393,184111.729429665\n2394,179374.482001188\n2395,207348.811884535\n2396,186983.419339031\n2397,206779.094049527\n2398,177472.074683935\n2399,156727.948324862\n2400,157090.568462479\n2401,160387.032696693\n2402,172410.28005086\n2403,191603.365657467\n2404,182152.207151253\n2405,180161.697340702\n2406,169652.235284283\n2407,182503.520140218\n2408,179714.630677039\n2409,180282.570719908\n2410,192600.338060371\n2411,166115.491248565\n2412,186379.553524443\n2413,184361.992258449\n2414,186220.965458121\n2415,198176.47090687\n2416,168437.776500131\n2417,178003.582312015\n2418,179180.469244588\n2419,191930.561104806\n2420,175590.266214964\n2421,176713.19307219\n2422,180159.090947005\n2423,188090.100808026\n2424,186184.717727913\n2425,223055.588672278\n2426,158270.753116401\n2427,184733.12846644\n2428,199926.378957429\n2429,175075.785166001\n2430,180917.925148076\n2431,182067.760625207\n2432,178238.60191545\n2433,173454.944606532\n2434,176821.936262814\n2435,183642.191304235\n2436,177254.582741058\n2437,168715.950111702\n2438,180096.931198144\n2439,160620.728178758\n2440,175286.544392273\n2441,153494.783276297\n2442,156407.65915545\n2443,162162.525245786\n2444,166809.886827197\n2445,172929.156408918\n2446,193514.330894137\n2447,181612.141603756\n2448,191745.386377068\n2449,171369.325038261\n2450,184425.470567051\n2451,170563.252355189\n2452,184522.369240168\n2453,164968.947931153\n2454,157939.621592364\n2455,151520.381580069\n2456,176129.508722531\n2457,171112.978971478\n2458,169762.081624282\n2459,162246.828936295\n2460,171339.303381589\n2461,189034.753653813\n2462,175758.873595981\n2463,163351.721489893\n2464,189806.546645026\n2465,175370.990918319\n2466,196895.599900301\n2467,176905.917994834\n2468,176866.557227858\n2469,163590.677170026\n2470,212693.502958393\n2471,192686.931747717\n2472,181578.684951827\n2473,166475.457581812\n2474,185998.255166219\n2475,185527.714877908\n2476,159027.118197683\n2477,181169.654933769\n2478,176732.915304722\n2479,191619.294648838\n2480,189114.303789324\n2481,180934.635330334\n2482,164573.372223048\n2483,173902.011270196\n2484,165625.127741229\n2485,179555.219570787\n2486,196899.720661579\n2487,207566.12470446\n2488,163899.981149274\n2489,189179.428177786\n2490,193892.880023125\n2491,178980.874331431\n2492,179749.876244365\n2493,197999.674975598\n2494,203717.470295797\n2495,185249.261156892\n2496,201691.208274848\n2497,181956.548314794\n2498,171895.936275806\n2499,187245.168439419\n2500,157816.77461318\n2501,191702.912573325\n2502,198599.420028908\n2503,187193.313676329\n2504,220514.993999535\n2505,181814.527595192\n2506,183750.755371907\n2507,183000.431679579\n2508,185830.971906573\n2509,185497.872344187\n2510,179613.437681321\n2511,164454.967963631\n2512,185127.237217638\n2513,178750.613844623\n2514,160927.61044889\n2515,192562.808057836\n2516,180990.24148554\n2517,180064.941503122\n2518,196070.997393789\n2519,180352.919019023\n2520,183367.953769362\n2521,176734.841494027\n2522,180848.220765939\n2523,187806.059368823\n2524,180521.52640004\n2525,181502.754496154\n2526,174525.87942676\n2527,188927.984063168\n2528,184728.870431253\n2529,179857.975518011\n2530,180962.868071609\n2531,179194.066390078\n2532,179591.789259484\n2533,180638.463702549\n2534,185846.215131922\n2535,195174.031139141\n2536,192474.56829063\n2537,164200.595496827\n2538,178403.094096818\n2539,170774.84018302\n2540,179879.945898337\n2541,177668.192752792\n2542,180174.328610725\n2543,170643.303572141\n2544,165448.004289838\n2545,195531.754886222\n2546,165314.177682121\n2547,172532.757660882\n2548,203310.218069877\n2549,175090.062515883\n2550,230841.338626282\n2551,155225.19006632\n2552,168322.342441945\n2553,165956.259265265\n2554,193956.817564124\n2555,171070.367893827\n2556,166285.243628001\n2557,182875.801346628\n2558,218108.536769738\n2559,174378.777632042\n2560,164731.316372391\n2561,156969.695083273\n2562,173388.854342604\n2563,177559.628685119\n2564,194297.789279905\n2565,174894.588364005\n2566,196544.144075798\n2567,179036.158528149\n2568,211423.986511149\n2569,208156.398935188\n2570,159233.941347257\n2571,210820.115134931\n2572,140196.10979821\n2573,198678.469082978\n2574,186818.610760803\n2575,175044.797633861\n2576,180031.162892704\n2577,176889.171525162\n2578,159638.856165666\n2579,154287.264375509\n2580,191885.618181273\n2581,177503.378612934\n2582,166548.31684976\n2583,164475.14942856\n2584,167484.744857879\n2585,188683.160555403\n2586,162243.399502668\n2587,180807.213919103\n2588,176279.079637039\n2589,163438.959094218\n2590,161495.5393685\n2591,216032.303722443\n2592,176632.181541401\n2593,168743.001567144\n2594,183810.11848086\n2595,156794.36054728\n2596,169136.43011395\n2597,183203.318752456\n2598,213252.926930889\n2599,190550.327866959\n2600,234707.209860273\n2601,135751.318892816\n2602,164228.45886894\n2603,153219.437030419\n2604,164210.746523801\n2605,163883.229117973\n2606,154892.776269956\n2607,197092.08733832\n2608,228148.376399122\n2609,178680.587503997\n2610,165643.341167808\n2611,222406.642660249\n2612,184021.843582599\n2613,170871.094939159\n2614,189562.873697309\n2615,170591.884966356\n2616,172934.351682851\n2617,186425.069879189\n2618,218648.131133006\n2619,183035.606761141\n2620,178378.906069427\n2621,184516.716597846\n2622,181419.5253183\n2623,196858.923438425\n2624,189228.701486278\n2625,208973.380761028\n2626,180269.86896412\n2627,159488.713683953\n2628,191490.299507521\n2629,228684.245137946\n2630,201842.998700429\n2631,209242.82289186\n2632,202357.62258493\n2633,168238.61218265\n2634,202524.12465369\n2635,170588.771929588\n2636,198375.31512987\n2637,170636.827889889\n2638,181991.079479377\n2639,183994.54251844\n2640,182951.482193584\n2641,174126.297156192\n2642,170575.496742588\n2643,175332.239869971\n2644,167522.061539111\n2645,168095.583738538\n2646,154406.415627461\n2647,170996.973346087\n2648,159056.890245639\n2649,181373.6165193\n2650,152272.560975937\n2651,168664.346821336\n2652,211007.008292301\n2653,182909.515032911\n2654,203926.829353303\n2655,179082.825442944\n2656,206260.099795032\n2657,181732.443415757\n2658,189698.740693148\n2659,203074.34678979\n2660,201670.634365666\n2661,173756.812589691\n2662,181387.076390881\n2663,184859.155270535\n2664,158313.615666777\n2665,151951.955409666\n2666,162537.52704471\n2667,178998.337067854\n2668,186732.584943041\n2669,187323.318406165\n2670,199437.232798284\n2671,185546.680858653\n2672,161595.015798593\n2673,154672.422763036\n2674,159355.710116165\n2675,155919.014077746\n2676,182424.87095604\n2677,178100.589622319\n2678,202577.900044456\n2679,177862.778940605\n2680,182056.024744887\n2681,191403.199177104\n2682,196264.754980043\n2683,209375.003419718\n2684,196691.81930173\n2685,192458.431539585\n2686,182242.80926507\n2687,183259.503900506\n2688,188108.243748841\n2689,171418.640195797\n2690,194698.882220432\n2691,174841.84007522\n2692,172965.476488899\n2693,189386.323677132\n2694,185682.618340257\n2695,176412.012719061\n2696,174976.489722867\n2697,180718.581707643\n2698,186131.188248242\n2699,165220.786354033\n2700,164115.893800435\n2701,182125.729127024\n2702,182285.140233276\n2703,196325.442210366\n2704,164865.215329881\n2705,182694.492209823\n2706,185425.485520958\n2707,171414.7041191\n2708,183433.472466085\n2709,176844.981155794\n2710,180568.187753206\n2711,185948.625475832\n2712,189388.291715481\n2713,142754.489165865\n2714,156106.800760811\n2715,155895.397617561\n2716,159851.977738548\n2717,185157.832305524\n2718,180716.291710805\n2719,176901.093954071\n2720,181017.222455218\n2721,183269.159407668\n2722,193550.830097069\n2723,170625.842699726\n2724,182012.405942725\n2725,179162.507290733\n2726,183269.159407668\n2727,180589.836175042\n2728,181465.935198741\n2729,196053.029878304\n2730,183421.020319014\n2731,167926.839083612\n2732,168027.530997889\n2733,182164.26685407\n2734,172469.071592608\n2735,181059.374300472\n2736,182997.570115536\n2737,166140.504179894\n2738,198515.546934075\n2739,193789.648503294\n2740,173550.025727531\n2741,176487.943174734\n2742,188813.302559147\n2743,178531.911979192\n2744,182145.731469001\n2745,179196.465024103\n2746,169618.349900686\n2747,170010.168655046\n2748,181739.671652174\n2749,172846.934955574\n2750,195560.8830172\n2751,180358.114292956\n2752,211817.702818093\n2753,176170.128686742\n2754,234492.248263699\n2755,182450.956536015\n2756,174902.068073146\n2757,173684.174293738\n2758,147196.673677562\n2759,175231.189709791\n2760,193417.64740633\n2761,183313.601249761\n2762,180882.250849082\n2763,186735.697979808\n2764,172922.865411247\n2765,202551.677190573\n2766,190485.634074173\n2767,173439.49362151\n2768,196613.598849219\n2769,178152.259700828\n2770,174519.904825949\n2771,172627.796932837\n2772,173732.689486435\n2773,209219.844787023\n2774,181059.374300472\n2775,188515.443002459\n2776,182164.26685407\n2777,188137.901597981\n2778,158893.54306269\n2779,189579.65066771\n2780,165229.803505847\n2781,162186.071220207\n2782,166374.879866351\n2783,161665.184974757\n2784,175079.328798445\n2785,203840.874021305\n2786,152129.078861057\n2787,181012.141380101\n2788,161305.53503837\n2789,203326.392972343\n2790,168385.571141831\n2791,183564.365159986\n2792,163784.619440861\n2793,171989.192193993\n2794,180839.95616829\n2795,170895.923185907\n2796,174071.054808518\n2797,259423.859147546\n2798,188000.824679588\n2799,179171.703565498\n2800,171022.241447762\n2801,174126.297156192\n2802,187625.573271948\n2803,199567.946369234\n2804,205328.078219268\n2805,166231.535025379\n2806,154743.91606057\n2807,159714.537012622\n2808,185563.069082422\n2809,171500.796725006\n2810,180983.443844799\n2811,183141.236914997\n2812,178498.634450214\n2813,224323.710512388\n2814,218200.642127877\n2815,182283.177756557\n2816,190054.639237419\n2817,160192.453934518\n2818,171289.393581756\n2819,151131.098733642\n2820,181721.458225594\n2821,172725.053851858\n2822,222438.699143414\n2823,235419.373448928\n2824,185150.926027596\n2825,184772.239624699\n2826,180658.216435809\n2827,209673.316647174\n2828,205939.810625621\n2829,165633.573325837\n2830,186030.317211014\n2831,160312.319589212\n2832,190702.440251029\n2833,175122.810326699\n2834,183783.13937519\n2835,178290.666302221\n2836,181605.343963015\n2837,187992.451444752\n2838,188885.11781517\n2839,189959.344795118\n2840,179258.619211334\n2841,181518.750275669\n2842,193008.659237315\n2843,186313.89385619\n2844,181499.39185067\n2845,174126.297156192\n2846,183918.612062767\n2847,184114.270899227\n2848,158540.947801398\n2849,197034.759055859\n2850,185170.284452595\n2851,221134.533635148\n2852,184306.637575967\n2853,199792.302740996\n2854,143237.803559736\n2855,177294.838897736\n2856,182368.620883855\n2857,176487.943174734\n2858,183849.408762071\n2859,184964.141507413\n2860,196395.969632434\n2861,188374.936650438\n2862,176261.296806135\n2863,163628.142248426\n2864,180618.032628904\n2865,161647.329794081\n2866,167129.598867773\n2867,174750.988352687\n2868,177560.202116333\n2869,192577.796112839\n2870,199202.898960871\n2871,182818.156667308\n2872,148217.262540651\n2873,188997.797082492\n2874,185807.928877601\n2875,177030.477842021\n2876,175942.474593632\n2877,172912.518576433\n2878,198359.248864591\n2879,184379.133036383\n2880,194255.566948886\n2881,209449.651603064\n2882,169979.323958443\n2883,188206.281858748\n2884,186412.438609167\n2885,196761.386409959\n2886,208353.269558209\n2887,166548.067241044\n2888,175942.474593632\n2889,166790.457916434\n2890,160515.850579067\n2891,192167.621096362\n2892,178751.551083369\n2893,198678.894117024\n2894,164553.120272354\n2895,156887.932862327\n2896,164185.777305524\n2897,212992.120630876\n2898,197468.550532521\n2899,180106.84373966\n2900,183972.071056674\n2901,245283.198337927\n2902,170351.963410756\n2903,195596.307707478\n2904,189369.756330412\n2905,223667.404551664\n2906,169335.310624364\n2907,167411.02835165\n2908,187709.555003968\n2909,196526.002998991\n2910,137402.569855589\n2911,165086.775061735\n2912,188506.431412274\n2913,172917.456816012\n2914,166274.325225982\n2915,167081.220948984\n2916,164788.778231138\n2917,219222.423400059\n2918,184924.279658997\n2919,187741.866657478\n"
  },
  {
    "path": "tests/test_commands.sh",
    "content": "#!/bin/bash\n\n# Verify all options are plumbed through to the MT.\n# Set envar KAGGLE_DEVELOPER to the Kaggle user name (probably already done).\n# When prompted to delete something, respond with \"no\".\n\n# Still need to adjust for assumptions about existing artifacts, like\n# the notebook \"exercise-as-with\"\n\nkaggle --version\n\necho \"kaggle competitions files\"\nkaggle competitions files titanic --page-size=3 --page-token=abcd -v -q\necho \"kaggle competitions list\"\nkaggle competitions list --group general --category featured --sort-by prize\necho \"kaggle competitions download\"\nkaggle c download titanic -w -o -q\nkaggle c download titanic -f test.csv -p tost\necho \"kaggle competitions submit\"\nkaggle c download house-prices-advanced-regression-techniques -f sample_submission.csv --force\nkaggle c submit house-prices-advanced-regression-techniques -f sample_submission.csv -m \"Test message\"\necho \"kaggle competitions submissions\"\nkaggle c submissions house-prices-advanced-regression-techniques -v -q\necho \"kaggle competitions leaderboard\"\nkaggle c leaderboard titanic -v -q -d -p leaders\nkaggle c leaderboard titanic -s > leaderboard.txt\nrm -r titanic.zip tost sample_submission.csv leaders leaderboard.txt\n\necho \"kaggle kernels list\"\nkaggle k list -m -s Exercise --page-size 5 -p 2 -v  --sort-by dateRun\nkaggle k list --parent $KAGGLE_DEVELOPER/exercise-lists\nkaggle k list --competition house-prices-advanced-regression-techniques --page-size 5\nkaggle k list --dataset dansbecker/home-data-for-ml-course --page-size 5\nkaggle k list --user $KAGGLE_DEVELOPER --language python --kernel-type notebook --output-type data\necho \"kaggle kernels files\"\nkaggle kernels files kerneler/sqlite-global-default -v --page-size=1\necho \"kaggle kernels init\"\nkaggle k init -p tests/kernel\necho \"kaggle kernels get\"\nkaggle k get -p tests/kernel $KAGGLE_DEVELOPER/exercise-as-with -m\nkaggle k get --wp $KAGGLE_DEVELOPER/exercise-as-with\n#sed -i s/exercise-as-with/exercise-delete/ tests/kernel/kernel-metadata.json\n#sed -i s/As \\& With/Delete/ tests/kernel/kernel-metadata.json\n#mv tests/kernel/exercise-as-with.ipynb tests/kernel/exercise-delete.ipynb\necho \"kaggle kernels update\"\nkaggle kernels update -p tests/kernel\necho \"kaggle kernels status\"\nkaggle k status kerneler/sqlite-global-default\necho \"kaggle kernels output\"\nkaggle k output kerneler/sqlite-global-default -o\necho \"kaggle kernels delete\"\n#kaggle k delete $KAGGLE_DEVELOPER/exercise-delete\n#kaggle k delete $KAGGLE_DEVELOPER/exercise-delete --yes\nrm -f tests/kernel/exercise-as-with.ipynb tests/kernel/kernel-metadata.json exercise-as-with.ipynb\n\necho \"kaggle datasets list\"\nkaggle d list --size 10\nkaggle d list -m\nkaggle d list --user oktayrdeki --csv\nkaggle d list --file-type csv --page 2 --sort-by updated -s student --min-size 13000 --max-size 15000\nkaggle d list --license odb --tags internet --search telco\necho \"kaggle datasets files\"\nkaggle datasets files kerneler/brazilian-bird-observation-metadata-from-wikiaves --page-size=7 --page-token=abcd\necho \"kaggle datasets init\"\nkaggle d init -p tests/dataset\necho \"kaggle datasets create\"\nexport SLUG=testing\nsed -i s/INSERT_TITLE_HERE/TitleHere/ tests/dataset/dataset-metadata.json\nsed -i s/INSERT_SLUG_HERE/$SLUG/ tests/dataset/dataset-metadata.json\nkaggle d create -p tests/dataset --public -q -t -r skip\necho \"kaggle datasets download\"\nkaggle datasets download -d willianoliveiragibin/pixar-films\nkaggle d download goefft/public-datasets-with-file-types-and-columns -p tmp --unzip -o -q\nkaggle d download goefft/public-datasets-with-file-types-and-columns -f dataset_results.csv -w -q -o\necho \"kaggle datasets version\"\nkaggle d version -m VersionNotesGoHere -p tests/dataset -q -t -r skip -d\necho \"kaggle datasets metadata\"\nkaggle datasets metadata goefft/public-datasets-with-file-types-and-columns -p tests/dataset\necho \"kaggle datasets status\"\nkaggle d status goefft/public-datasets-with-file-types-and-columns\necho \"kaggle datasets delete\"\nkaggle d delete $KAGGLE_DEVELOPER/$SLUG\nkaggle d delete $KAGGLE_DEVELOPER/$SLUG --yes\nrm -rf tmp tests/dataset/dataset-metadata.json dataset_results.csv.zip dataset_results.csv pixar-films.zip\n\necho \"kaggle models init\"\nmkdir tmp\nkaggle m init -p tmp\necho \"kaggle models list\"\nkaggle m list --owner $KAGGLE_DEVELOPER --sort-by createTime -v\nkaggle m list -s gemini --page-size 5\necho \"kaggle models create\"\nsed -i s/INSERT_OWNER_SLUG_HERE/$KAGGLE_DEVELOPER/ tmp/model-metadata.json\nsed -i s/INSERT_TITLE_HERE/ModelTitle/ tmp/model-metadata.json\nsed -i s/INSERT_SLUG_HERE/test-model/ tmp/model-metadata.json\nkaggle m create -p tmp\necho \"kaggle models update\"\nkaggle m update -p tmp\nsleep 10\necho \"kaggle models get\"\nkaggle m get -p tmp $KAGGLE_DEVELOPER/test-model\n\necho \"kaggle models instances init\"\nkaggle m instances init -p tmp\necho \"kaggle models instances create\"\nsed -i s/INSERT_OWNER_SLUG_HERE/$KAGGLE_DEVELOPER/ tmp/model-instance-metadata.json\nsed -i s/INSERT_EXISTING_MODEL_SLUG_HERE/test-model/ tmp/model-instance-metadata.json\nsed -i s/INSERT_INSTANCE_SLUG_HERE/main/ tmp/model-instance-metadata.json\nsed -i s/INSERT_FRAMEWORK_HERE/jax/ tmp/model-instance-metadata.json\necho \"a,b,c,d\" > tmp/data.csv\nkaggle models instances create -p tmp -q -r skip\nsleep 10\necho \"kaggle models instances update\"\nkaggle models instances update -p tmp\nsleep 10\necho \"kaggle models instances get\"\nkaggle models instances get $KAGGLE_DEVELOPER/test-model/jax/main -p tmp\necho \"kaggle models instances files\"\nkaggle models instances files $KAGGLE_DEVELOPER/test-model/jax/main -v --page-size 5\n\necho \"kaggle models instances versions files\"\nkaggle models instances versions files google/gemma/pytorch/7b/2 -v --page-size=3 --page-token=abcd\necho \"kaggle models instances versions create\"\nkaggle models instances versions create -p tmp -q -r skip -n VersionNotes $KAGGLE_DEVELOPER/test-model/jax/main\necho \"kaggle models instances versions download\"\nkaggle models instances versions download -p tmp -q -f --untar $KAGGLE_DEVELOPER/test-model/jax/main/1\n\nrm -rf tmp\nrm -f results.csv\n\necho \"kaggle models instances versions delete\"\nkaggle m instances versions delete $KAGGLE_DEVELOPER/test-model/jax/main/1\nkaggle m instances versions delete $KAGGLE_DEVELOPER/test-model/jax/main/1 -y\necho \"kaggle models instances delete\"\nkaggle m instances delete $KAGGLE_DEVELOPER/test-model/jax/main\nkaggle m instances delete $KAGGLE_DEVELOPER/test-model/jax/main -y\necho \"kaggle models delete\"\nkaggle m delete $KAGGLE_DEVELOPER/test-model\nkaggle m delete $KAGGLE_DEVELOPER/test-model -y\n"
  },
  {
    "path": "tests/unit_tests.py",
    "content": "# coding=utf-8\nimport json\nimport shutil\nimport unittest\nimport os\nimport sys\nimport time\n\nfrom requests import HTTPError\n\n# noinspection PyTypeChecker\nsys.path.insert(0, \"..\")\n\nfrom kaggle import api\n\nApiException = IOError\n# Unit test names include a letter to sort them in run order.\n# That seemed easier and more obvious than defining a test suite.\n\n# Run these tests in the container with the server running.\n# In the case of unresolvable failure, run reset_database.sh.\n\n# To run from Rider, create a Python tests>Unittests run config.\n# Give it the module: unit_tests.TestKaggleApi\n# Set the working directory to: kaggle-cli/tests\n# Define some envars:\n# KAGGLE_API_ENVIRONMENT=LOCALHOST\n# KAGGLE_CONFIG_DIR=/home/kaggle/.config/kaggle/dev\n# KAGGLE_KEY=local_api_token\n# KAGGLE_USERNAME=<kaggle-user-name>\n\n# Add those envars to the Python Tests>Unittest template to\n# make running individual tests easier.\n\ntest_user = api.config_values[\"username\"]\nmodel_title = \"testing\"\ninstance_name = \"test\"\nframework_name = \"jax\"\nkernel_name = \"testing-x\"\ndataset_name = \"kaggleapi-dataset-x\"\nup_file = \"sample_submission.csv\"\ndescription = \"House prices submission message\"\ncompetition = \"house-prices-advanced-regression-techniques\"\ndataset_directory = \"dataset\"\nkernel_directory = \"kernel\"\nmodel_directory = \"model\"\nmodel_inst_directory = os.path.join(model_directory, \"instance\")\nmodel_inst_vers_directory = os.path.join(model_inst_directory, \"version\")\n\n# Max retries to get kernel status\nmax_status_tries = 10\n\n\ndef tearDownModule():\n    file = os.path.join(dataset_directory, api.DATASET_METADATA_FILE)\n    if os.path.exists(file):\n        os.remove(file)\n    file = os.path.join(kernel_directory, api.KERNEL_METADATA_FILE)\n    if os.path.exists(file):\n        os.remove(file)\n    file = os.path.join(model_directory, api.MODEL_METADATA_FILE)\n    if os.path.exists(file):\n        os.remove(file)\n    file = os.path.join(model_inst_directory, api.MODEL_INSTANCE_METADATA_FILE)\n    if os.path.exists(file):\n        os.remove(file)\n\n\ndef update_kernel_metadata_file(metadata_file, k_name):\n    with open(metadata_file) as f:\n        meta_data = json.load(f)\n        meta_id = meta_data[\"id\"]\n        if \"INSERT_KERNEL_SLUG_HERE\" in meta_id:\n            meta_id = meta_id.replace(\"INSERT_KERNEL_SLUG_HERE\", k_name)\n        meta_title = meta_data[\"title\"]\n        if \"INSERT_TITLE_HERE\" == meta_title:\n            meta_title = k_name\n        meta_path = meta_data[\"code_file\"]\n        if \"INSERT_CODE_FILE_PATH_HERE\" == meta_path:\n            meta_path = f\"{k_name}.ipynb\"\n        meta_data[\"id\"] = meta_id\n        meta_data[\"title\"] = meta_title\n        meta_data[\"code_file\"] = meta_path\n        meta_data[\"language\"] = \"python\"\n        meta_data[\"kernel_type\"] = \"notebook\"\n    with open(metadata_file, \"w\") as f:\n        json.dump(meta_data, f, indent=2)\n    return meta_data\n\n\ndef initialize_dataset_metadata_file(dataset_dir):\n    metadata_file = os.path.join(dataset_dir, api.DATASET_METADATA_FILE)\n    try:\n        with open(metadata_file) as f:\n            original = json.load(f)\n            if \"versionNumber\" in original:\n                version_num = int(original[\"versionNumber\"])\n            else:\n                version_num = 0\n    except FileNotFoundError:\n        version_num = 0\n    version_num += 1\n    return version_num, metadata_file\n\n\ndef update_dataset_metadata_file(metadata_file, data_name, version_num):\n    with open(metadata_file) as f:\n        meta_data = json.load(f)\n        meta_id = meta_data[\"id\"]\n        if \"INSERT_SLUG_HERE\" in meta_id:\n            meta_id = meta_id.replace(\"INSERT_SLUG_HERE\", data_name)\n        meta_title = meta_data[\"title\"]\n        if \"INSERT_TITLE_HERE\" == meta_title:\n            meta_title = data_name\n        meta_data[\"id\"] = meta_id\n        meta_data[\"title\"] = meta_title\n        meta_data[\"versionNumber\"] = version_num\n    if not \"resources\" in meta_data:\n        resource_list = [\n            {\n                \"path\": \"data.csv\",\n                \"description\": \"Description\",\n                \"schema\": {\n                    \"fields\": [\n                        {\"name\": \"NumberField\", \"description\": \"id\", \"type\": \"number\"},\n                        {\"name\": \"StringField\", \"description\": \"label\", \"type\": \"string\"},\n                    ]\n                },\n            }\n        ]\n        meta_data.update({\"resources\": resource_list})\n    with open(metadata_file, \"w\") as f:\n        json.dump(meta_data, f)\n\n\ndef update_model_metadata(metadata_file, owner, title, slug):\n    with open(metadata_file) as f:\n        meta_data = json.load(f)\n        meta_id = meta_data[\"ownerSlug\"]\n        if \"INSERT_OWNER_SLUG_HERE\" == meta_id:\n            meta_id = owner\n        meta_title = meta_data[\"title\"]\n        if \"INSERT_TITLE_HERE\" == meta_title:\n            meta_title = title\n        meta_path = meta_data[\"slug\"]\n        if \"INSERT_SLUG_HERE\" == meta_path:\n            meta_path = slug\n        meta_data[\"ownerSlug\"] = meta_id\n        meta_data[\"title\"] = meta_title\n        meta_data[\"slug\"] = meta_path\n    with open(metadata_file, \"w\") as f:\n        json.dump(meta_data, f, indent=2)\n    return meta_data\n\n\ndef update_model_instance_metadata(metadata_file, owner, model_slug, instance_slug, framework):\n    with open(metadata_file) as f:\n        meta_data = json.load(f)\n        meta_owner = meta_data[\"ownerSlug\"]\n        if \"INSERT_OWNER_SLUG_HERE\" == meta_owner:\n            meta_owner = owner\n        meta_framework = meta_data[\"framework\"]\n        if \"INSERT_FRAMEWORK_HERE\" == meta_framework:\n            meta_framework = framework\n        meta_instance = meta_data[\"instanceSlug\"]\n        if \"INSERT_INSTANCE_SLUG_HERE\" == meta_instance:\n            meta_instance = instance_slug\n        meta_model = meta_data[\"modelSlug\"]\n        if \"INSERT_EXISTING_MODEL_SLUG_HERE\" == meta_model:\n            meta_model = model_slug\n        meta_data[\"ownerSlug\"] = meta_owner\n        meta_data[\"modelSlug\"] = meta_model\n        meta_data[\"framework\"] = meta_framework\n        meta_data[\"instanceSlug\"] = meta_instance\n    with open(metadata_file, \"w\") as f:\n        json.dump(meta_data, f, indent=2)\n    return meta_data\n\n\ndef print_fields(instance, fields):  # For debugging.\n    for f in fields:\n        if not hasattr(instance, api.camel_to_snake(f)):\n            print(f\"Missing field: {f} named: {api.camel_to_snake(f)}\")\n\n\n# noinspection PyTypeChecker\nclass TestKaggleApi(unittest.TestCase):\n\n    version_number, meta_file = initialize_dataset_metadata_file(dataset_directory)\n\n    # Initialized from Response objects.\n    competition_file = None\n    kernel_slug = \"\"\n    kernel_metadata_path = \"\"\n    dataset = \"\"\n    dataset_file = None\n    model_instance = \"\"\n    model_meta_data = None\n    model_metadata_file = \"\"\n    instance_metadata_file = \"\"\n\n    # Inbox\n\n    def test_files_upload(self):\n        a = 2  # Change this value to run this test.\n        if a - 1 == 1:\n            return  # Only run this test when needed because it uploads an inbox file.\n        filename = \"tmp_file.test\"\n        with open(filename, \"w\") as f:\n            f.write(\"test\")\n        try:\n            api.files_upload_cli([filename], \"kaggle-cli-test\", False, False)\n        finally:\n            if os.path.exists(\"tmp_file.test\"):\n                os.remove(\"tmp_file.test\")\n\n    # Kernels\n\n    def test_kernels_a_list(self):\n        try:\n            kernels = api.kernels_list(sort_by=\"dateCreated\", user=\"stevemessick\", language=\"python\")\n            self.assertGreater(len(kernels), 0)\n            api.kernels_list_cli(user=\"stevemessick\", csv_display=True)\n        except ApiException as e:\n            self.fail(f\"kernels_list failed: {e}\")\n\n    def test_kernels_b_initialize(self):\n        try:\n            self.kernel_metadata_path = api.kernels_initialize(kernel_directory)\n            self.assertTrue(os.path.exists(self.kernel_metadata_path))\n        except ApiException as e:\n            self.fail(f\"kernels_initialize failed: {e}\")\n\n    def test_kernels_c_push(self):\n        if self.kernel_metadata_path == \"\":\n            self.test_kernels_b_initialize()\n        try:\n            md = update_kernel_metadata_file(self.kernel_metadata_path, kernel_name)\n            push_result = api.kernels_push(kernel_directory)\n            self.assertIsNotNone(push_result.ref)\n            self.assertTrue(isinstance(push_result.version_number, int))\n            self.kernel_slug = md[\"id\"]\n            time.sleep(30)\n        except ApiException as e:\n            self.fail(f\"kernels_push failed: {e}\")\n\n    def test_kernels_d_status(self):\n        if self.kernel_slug == \"\":\n            self.test_kernels_c_push()\n        try:\n            status_result = api.kernels_status(self.kernel_slug)\n            start_time = time.time()\n            # If this loop is stuck because the kernel stays queued, go to the Kaggle website\n            # on localhost and cancel the active event. That will exit the loop, but you may\n            # need to clean up other active kernels to get it to run again.\n            count = 0\n            while status_result.status == \"running\" or status_result.status == \"queued\" or count >= max_status_tries:\n                time.sleep(5)\n                status_result = api.kernels_status(self.kernel_slug)\n                print(status_result.status)\n            if count >= max_status_tries:\n                self.fail(f\"Could not get kernel status in allowed trys. Status: {status_result.status}\")\n            end_time = time.time()\n            print(f\"kernels_status ready in {end_time-start_time}s\")\n        except ApiException as e:\n            self.fail(f\"kernels_status failed: {e}\")\n\n    def test_kernels_e_list_files(self):\n        if self.kernel_slug == \"\":\n            self.test_kernels_c_push()\n        try:\n            fs = api.kernels_list_files(self.kernel_slug)\n            # TODO Make sure the test uses a kernel that has at least one file.\n            self.assertGreaterEqual(len(fs.files), 0)\n        except ApiException as e:\n            self.fail(f\"kernels_list_files failed: {e}\")\n\n    def test_kernels_f_output(self):\n        fs = []\n        try:\n            fs, token = api.kernels_output(\"kerneler/sqlite-global-default\", \"kernel/tmp\")\n            self.assertIsInstance(fs, list)\n            if token:\n                print(token)\n        except ApiException as e:\n            self.fail(f\"kernels_output failed: {e}\")\n        finally:\n            for file in fs:\n                if os.path.exists(file):\n                    os.remove(file)\n            if os.path.exists(\"kernel/tmp\"):\n                os.rmdir(\"kernel/tmp\")\n\n    def test_kernels_g_pull(self):\n        if self.kernel_metadata_path == \"\":\n            self.test_kernels_c_push()\n        fs = \"\"\n        try:\n            fs = api.kernels_pull(f\"{test_user}/{kernel_name}\", \"kernel/tmp\", metadata=True)\n            self.assertTrue(os.path.exists(fs))\n            with open(f'{fs}/{self.kernel_metadata_path.split(\"/\")[1]}') as f:\n                metadata = json.load(f)\n                [\n                    self.assertTrue(metadata.get(f))\n                    for f in [\"id\", \"id_no\", \"title\", \"code_file\", \"language\", \"kernel_type\"]\n                ]\n                [\n                    self.assertTrue(metadata.get(f) is not None)\n                    for f in [\n                        \"is_private\",\n                        \"enable_gpu\",\n                        \"enable_tpu\",\n                        \"enable_internet\",\n                        \"keywords\",\n                        \"dataset_sources\",\n                        \"kernel_sources\",\n                        \"competition_sources\",\n                        \"model_sources\",\n                    ]\n                ]\n        except ApiException as e:\n            self.fail(f\"kernels_pull failed: {e}\")\n        finally:\n            shutil.rmtree(fs)\n\n    # Competitions\n\n    def test_competition_a_list(self):\n        try:\n            competitions = api.competitions_list(group=\"general\").competitions\n            self.assertGreater(len(competitions), 0)\n            self.assertLessEqual(len(competitions), 20)\n            [self.assertTrue(hasattr(competitions[0], api.camel_to_snake(f))) for f in api.competition_fields]\n            competitions = api.competitions_list(page=2, category=\"gettingStarted\", sort_by=\"prize\").competitions\n            self.assertEqual(len(competitions), 1)\n        except ApiException as e:\n            self.fail(f\"competitions_list failed: {e}\")\n\n    def test_competition_b_submit(self):\n        try:\n            self.skip_submissions = False\n            result = api.competition_submit_cli(up_file, description, competition)\n            if not result or not result.startswith(\"Successfully submitted\"):\n                self.fail(f\"competition_submit failed: {result}\")\n        except HTTPError:\n            # Handle submission limit reached gracefully (potentially skip the test)\n            print(\"Competition submission limit reached for the day\")\n            self.skip_submissions = True\n            pass\n        except ApiException as e:\n            self.fail(f\"competition_submit failed: {e}\")\n\n    def test_competition_c_submissions(self):\n        self.test_competition_b_submit()\n        try:\n            submissions = api.competition_submissions(competition)\n            self.assertIsInstance(submissions, list)\n            if not self.skip_submissions:\n                self.assertGreater(len(submissions), 0)\n                [self.assertTrue(hasattr(submissions[0], api.camel_to_snake(f))) for f in api.submission_fields]\n        except ApiException as e:\n            self.fail(f\"competition_submissions failed: {e}\")\n\n    def test_competition_d_list_files(self):\n        try:\n            competition_files = api.competition_list_files(competition).files\n            self.assertIsInstance(competition_files, list)\n            self.assertGreater(len(competition_files), 0)\n            self.competition_file = competition_files[0]\n            [self.assertTrue(hasattr(competition_files[0], api.camel_to_snake(f))) for f in api.competition_file_fields]\n        except ApiException as e:\n            self.fail(f\"competition_list_files failed: {e}\")\n\n    def test_competition_e_download_file(self):\n        if self.competition_file is None:\n            self.test_competition_d_list_files()\n        try:\n            api.competition_download_file(competition, self.competition_file.ref, force=True)\n            self.assertTrue(os.path.exists(self.competition_file.ref))\n            api.competition_download_file(competition, self.competition_file.ref, force=False)\n        except ApiException as e:\n            self.fail(f\"competition_download_file failed: {e}\")\n        finally:\n            if os.path.exists(self.competition_file.ref):\n                os.remove(self.competition_file.ref)\n\n    def test_competition_f_download_files(self):\n        try:\n            api.competition_download_files(competition)\n            self.assertTrue(os.path.exists(f\"{competition}.zip\"))\n            self.assertTrue(os.path.getsize(f\"{competition}.zip\") > 0)\n        except ApiException as e:\n            self.fail(f\"competition_download_files failed: {e}\")\n        finally:\n            if os.path.exists(f\"{competition}.zip\"):\n                os.remove(f\"{competition}.zip\")\n\n    def test_competition_g_leaderboard_view(self):\n        try:\n            result = api.competition_leaderboard_view(competition)\n            self.assertIsInstance(result, list)\n            self.assertGreater(len(result), 0)\n            [self.assertTrue(hasattr(result[0], api.camel_to_snake(f))) for f in api.competition_leaderboard_fields]\n        except ApiException as e:\n            self.fail(f\"competition_leaderboard_view failed: {e}\")\n\n    def test_competition_h_leaderboard_download(self):\n        try:\n            api.competition_leaderboard_download(competition, \"tmp\")\n            self.assertTrue(os.path.exists(f\"tmp/{competition}.zip\"))\n        except ApiException as e:\n            self.fail(f\"competition_leaderboard_download failed: {e}\")\n        finally:\n            if os.path.exists(f\"tmp/{competition}.zip\"):\n                os.remove(f\"tmp/{competition}.zip\")\n            if os.path.exists(\"tmp\"):\n                os.rmdir(\"tmp\")\n\n    # Datasets\n\n    def test_dataset_a_list(self):\n        try:\n            datasets = api.dataset_list(sort_by=\"votes\")\n            self.assertGreater(len(datasets), 0)\n            self.dataset = str(datasets[0].ref)\n            [self.assertTrue(hasattr(datasets[0], api.camel_to_snake(f))) for f in api.dataset_fields]\n            datasets = api.dataset_list(license_name=\"other\", file_type=\"bigQuery\")\n            self.assertGreater(len(datasets), 10)\n        except ApiException as e:\n            self.fail(f\"dataset_list failed: {e}\")\n\n    def test_dataset_b_metadata(self):\n        if self.dataset == \"\":\n            self.test_dataset_a_list()\n        try:\n            m = api.dataset_metadata(self.dataset, dataset_directory)\n            self.assertTrue(os.path.exists(m))\n        except ApiException as e:\n            self.fail(f\"dataset_metadata failed: {e}\")\n\n    def test_dataset_c_metadata_update(self):\n        if self.dataset == \"\":\n            self.test_dataset_a_list()\n        if not os.path.exists(os.path.join(dataset_directory, api.DATASET_METADATA_FILE)):\n            self.test_dataset_b_metadata()\n        try:\n            api.dataset_metadata_update(self.dataset, dataset_directory)\n            # TODO Make the API method return something, and not exit when it fails.\n        except ApiException as e:\n            self.fail(f\"dataset_metadata_update failed: {e}\")\n\n    def test_dataset_d_list_files(self):\n        if self.dataset == \"\":\n            self.test_dataset_a_list()\n        try:\n            response = api.dataset_list_files(self.dataset)\n            self.assertIsInstance(response.dataset_files, list)\n            self.assertGreater(len(response.dataset_files), 0)\n            self.dataset_file = response.dataset_files[0]\n            [self.assertTrue(hasattr(self.dataset_file, api.camel_to_snake(f))) for f in api.dataset_file_fields]\n            api.dataset_list_files_cli(self.dataset)\n        except ApiException as e:\n            self.fail(f\"dataset_list_files failed: {e}\")\n\n    def test_dataset_e_status(self):\n        if self.dataset == \"\":\n            self.test_dataset_a_list()\n        try:\n            status = api.dataset_status(self.dataset)\n            self.assertIn(status, [\"ready\", \"pending\", \"error\"])\n        except ApiException as e:\n            self.fail(f\"dataset_status failed: {e}\")\n\n    def test_dataset_f_download_file(self):\n        if self.dataset_file is None:\n            self.test_dataset_d_list_files()\n        try:\n            api.dataset_download_file(self.dataset, self.dataset_file.name, \"tmp\")\n            self.assertTrue(os.path.exists(f\"tmp/{self.dataset_file.name}\"))\n        except ApiException as e:\n            self.fail(f\"dataset_download_file failed: {e}\")\n        finally:\n            if os.path.exists(f\"tmp/{self.dataset_file.name}\"):\n                os.remove(f\"tmp/{self.dataset_file.name}\")\n            if os.path.exists(\"tmp\"):\n                os.rmdir(\"tmp\")\n\n    def test_dataset_g_download_files(self):\n        if self.dataset == \"\":\n            self.test_dataset_a_list()\n        ds = [\"a\", \"b\"]\n        try:\n            api.dataset_download_files(self.dataset + \"/1\")\n            ds = self.dataset.split(\"/\")\n            self.assertTrue(os.path.exists(f\"{ds[1]}.zip\"))\n        except ApiException as e:\n            self.fail(f\"dataset_download_files failed: {e}\")\n        finally:\n            if os.path.exists(f\"{ds[1]}.zip\"):\n                os.remove(f\"{ds[1]}.zip\")\n\n    def test_dataset_h_initialize(self):\n        try:\n            api.dataset_initialize(\"dataset\")\n            self.assertTrue(os.path.exists(os.path.join(dataset_directory, api.DATASET_METADATA_FILE)))\n        except ApiException as e:\n            self.fail(f\"dataset_initialize failed: {e}\")\n\n    def test_dataset_ia_create_new(self, fail_if_exists=True):\n        if not os.path.exists(os.path.join(dataset_directory, api.DATASET_METADATA_FILE)):\n            self.test_dataset_h_initialize()\n        try:\n            update_dataset_metadata_file(self.meta_file, dataset_name, self.version_number)\n            new_dataset = api.dataset_create_new(dataset_directory)\n            self.assertIsNotNone(new_dataset)\n            if len(new_dataset.error) > 0:\n                if fail_if_exists:\n                    self.fail(f\"dataset_create_new failed: {new_dataset.error}\")\n        except ApiException as e:\n            if fail_if_exists:\n                self.fail(f\"dataset_create_new failed: {e}\")\n\n    def test_dataset_ib_wait_after_create(self):\n        # When running all tests sequentially, give the new dataset some time to stabilize.\n        time.sleep(10)  # TODO: Use a status check.\n\n    def test_dataset_j_create_version(self):\n        if not os.path.exists(os.path.join(dataset_directory, api.DATASET_METADATA_FILE)):\n            self.test_dataset_ia_create_new(fail_if_exists=False)\n        try:\n            new_version = api.dataset_create_version(dataset_directory, \"Notes\")\n            self.assertIsNotNone(new_version)\n            self.assertTrue(new_version.error == \"\")\n            self.assertFalse(new_version.ref == \"\")\n        except ApiException as e:\n            self.fail(f\"dataset_create_version failed: {e}\")\n\n    def test_dataset_k_delete(self):\n        self.test_dataset_ia_create_new(fail_if_exists=False)\n        api.dataset_delete(None, dataset_name, True)\n\n    # Models\n\n    def test_model_a_list(self):\n        try:\n            ms = api.model_list()\n            self.assertIsInstance(ms, list)\n            self.assertGreater(len(ms), 0)\n            [self.assertTrue(hasattr(ms[0], api.camel_to_snake(f))) for f in api.model_fields]\n        except ApiException as e:\n            self.fail(f\"models_list failed: {e}\")\n\n    def test_model_b_initialize(self):\n        try:\n            self.model_metadata_file = api.model_initialize(model_directory)\n            self.assertTrue(os.path.exists(self.model_metadata_file))\n            self.model_meta_data = update_model_metadata(self.model_metadata_file, test_user, model_title, model_title)\n            self.model_instance = f'{test_user}/{self.model_meta_data[\"slug\"]}/{framework_name}/{instance_name}'\n        except ApiException as e:\n            self.fail(f\"model_initialize failed: {e}\")\n\n    def test_model_c_create_new(self):\n        if self.model_metadata_file == \"\":\n            self.test_model_b_initialize()\n        try:\n            model = api.model_create_new(model_directory)\n            if model.error:\n                if \"already used\" in model.error:\n                    delete_response = api.model_delete(f\"{test_user}/{model_title}\", True)\n                    if delete_response.error:\n                        self.fail(delete_response.error)\n                    else:\n                        model = api.model_create_new(model_directory)\n                        if model.error:\n                            self.fail(model.error)\n                else:\n                    self.fail(model.error)\n            self.assertIsNotNone(model.ref)\n            self.assertGreater(len(model.ref), 0)\n            [self.assertTrue(hasattr(model, api.camel_to_snake(f))) for f in [\"id\", \"url\"]]\n        except ApiException as e:\n            self.fail(f\"model_create_new failed: {e}\")\n\n    def test_model_d_get(self):\n        try:\n            model_data = api.model_get(f\"{test_user}/{model_title}\")\n            self.assertIsNotNone(model_data.ref)\n            self.assertGreater(len(model_data.ref), 0)\n            self.assertEqual(model_data.title, model_title)\n            [self.assertTrue(hasattr(model_data, api.camel_to_snake(f))) for f in api.model_all_fields]\n        except ApiException as e:\n            self.fail(f\"model_get failed: {e}\")\n\n    def test_model_e_update(self):\n        if self.model_metadata_file == \"\":\n            self.test_model_c_create_new()\n        try:\n            update_response = api.model_update(model_directory)\n            self.assertEqual(len(update_response.error), 0)\n            self.assertIsNotNone(update_response.ref)\n            self.assertGreater(len(update_response.ref), 0)\n        except ApiException as e:\n            self.fail(f\"model_update failed: {e}\")\n\n    # Model instances\n\n    def test_model_instance_a_initialize(self):\n        try:\n            self.instance_metadata_file = api.model_instance_initialize(model_inst_directory)\n            self.assertTrue(os.path.exists(self.instance_metadata_file))\n        except ApiException as e:\n            self.fail(f\"model_instance_initialize failed: {e}\")\n\n    def test_model_instance_b_create(self, check_result: bool = True):\n        if self.model_meta_data is None:\n            self.test_model_b_initialize()\n        if self.instance_metadata_file == \"\":\n            self.test_model_instance_a_initialize()\n        try:\n            update_model_instance_metadata(\n                self.instance_metadata_file, test_user, self.model_meta_data[\"slug\"], instance_name, framework_name\n            )\n            inst_create_resp = api.model_instance_create(model_inst_directory)\n            if check_result:\n                if inst_create_resp.error:\n                    if \"already exists\" in inst_create_resp.error:\n                        delete_response = api.model_instance_delete(f\"{test_user}/{model_title}\", True)\n                        if delete_response.error:\n                            self.fail(delete_response.error)\n                        else:\n                            inst_create_resp = api.model_instance_create(model_inst_directory)\n                            if inst_create_resp.error:\n                                self.fail(inst_create_resp.error)\n                    else:\n                        self.fail(inst_create_resp.error)\n                self.assertIsNotNone(inst_create_resp.ref)\n                self.assertGreater(len(inst_create_resp.ref), 0)\n        except ApiException as e:\n            self.fail(f\"model_instance_create failed: {e}\")\n\n    def test_model_instance_b_wait_after_create(self):\n        # When running all tests sequentially, give the new model some time to stabilize.\n        time.sleep(10)  # TODO: Find a better way to detect model stability.\n\n    def test_model_instance_c_get(self):\n        if self.model_instance == \"\":\n            self.test_model_b_initialize()\n            self.test_model_c_create_new()\n            self.test_model_instance_a_initialize()\n            self.test_model_instance_b_create()\n            self.test_model_instance_b_wait_after_create()\n            self.test_model_instance_c_get()\n        try:\n            inst_get_resp = api.model_instance_get(self.model_instance)\n            self.assertIsNotNone(inst_get_resp.url)\n            self.assertGreater(len(inst_get_resp.url), 0)\n            os.makedirs(\"model/tmp\", exist_ok=True)\n            api.model_instance_get_cli(self.model_instance, \"model/tmp\")\n        except ApiException as e:\n            self.fail(f\"model_instance_get failed: {e}\")\n        finally:\n            shutil.rmtree(\"model/tmp\")\n\n    def test_model_instance_d_files(self):\n        if self.model_instance == \"\":\n            self.test_model_b_initialize()\n        try:\n            inst_files_resp = api.model_instance_files(self.model_instance)\n            self.assertIsInstance(inst_files_resp.files, list)\n            self.assertGreater(len(inst_files_resp.files), 0)\n            [self.assertTrue(hasattr(inst_files_resp.files[0], api.camel_to_snake(f))) for f in api.model_file_fields]\n        except ApiException as e:\n            self.fail(f\"model_instance_files failed: {e}\")\n\n    def test_model_instance_e_update(self):\n        if self.model_instance == \"\":\n            self.test_model_b_initialize()\n            self.test_model_instance_a_initialize()\n            try:\n                self.test_model_c_create_new()\n            except AssertionError:\n                pass\n            try:\n                update_model_instance_metadata(\n                    self.instance_metadata_file, test_user, self.model_meta_data[\"slug\"], instance_name, framework_name\n                )\n            except AssertionError:\n                pass\n            self.test_model_instance_b_create(check_result=False)\n            self.test_model_instance_b_wait_after_create()\n        try:\n            inst_update_resp = api.model_instance_update(model_inst_directory)\n            self.assertIsNotNone(inst_update_resp)\n            self.assertIsNotNone(inst_update_resp.ref)\n            self.assertGreater(len(inst_update_resp.ref), 0)\n            [self.assertTrue(hasattr(inst_update_resp, api.camel_to_snake(f))) for f in [\"error\", \"id\", \"ref\", \"url\"]]\n        except ApiException as e:\n            self.fail(f\"model_instance_update failed: {e}\")\n\n    def test_model_instance_f_list(self):\n        if self.model_instance == \"\":\n            self.test_model_instance_c_get()\n        try:\n            a, b, c, d = self.model_instance.split(\"/\")\n            inst_files_resp = api.model_instances_list(f\"{a}/{b}\")\n            self.assertIsInstance(inst_files_resp.instances, list)\n            self.assertGreater(len(inst_files_resp.instances), 0)\n            [\n                self.assertTrue(hasattr(inst_files_resp.instances[0], api.camel_to_snake(f)))\n                for f in api.model_instance_fields\n            ]\n        except ApiException as e:\n            self.fail(f\"model_instance_files failed: {e}\")\n\n    # Model instance versions\n\n    def test_model_instance_version_a_create(self):\n        if self.model_instance == \"\":\n            self.test_model_b_initialize()\n        try:\n            version_metadata_resp = api.model_instance_version_create(self.model_instance, model_inst_vers_directory)\n            self.assertIsNotNone(version_metadata_resp.ref)\n            [self.assertTrue(hasattr(version_metadata_resp, api.camel_to_snake(f))) for f in [\"id\", \"url\", \"error\"]]\n        except ApiException as e:\n            self.fail(f\"model_instance_version_create failed: {e}\")\n\n    def test_model_instance_version_b_files(self):\n        if self.model_instance == \"\":\n            self.test_model_b_initialize()\n        try:\n            r = api.model_instance_version_files(f\"{self.model_instance}/1\")\n            self.assertIsInstance(r.files, list)\n            self.assertGreater(len(r.files), 0)\n            api.model_instance_version_files_cli(f\"{self.model_instance}/1\")\n        except ApiException as e:\n            self.fail(f\"model_instance_version_files failed: {e}\")\n\n    def test_model_instance_version_c_download(self):\n        for x in range(0, 5):\n            if self.model_instance == \"\":\n                self.test_model_b_initialize()\n            version_file = \"\"\n            try:\n                version_file = api.model_instance_version_download(f\"{self.model_instance}/1\", \"tmp\", force=True)\n                self.assertTrue(os.path.exists(version_file))\n            except KeyError:\n                pass  # TODO Create a version that has content.\n            except ApiException as e:\n                if e.strerror.startsWith(\"The archive is not ready yet\"):\n                    continue\n                self.fail(f\"model_instance_version_download failed: {e}\")\n            finally:\n                if os.path.exists(version_file):\n                    os.remove(version_file)\n                if os.path.exists(\"tmp\"):\n                    os.rmdir(\"tmp\")\n                return\n\n    def test_model_instance_version_d_list(self):\n        pass\n\n    # Kernel deletion\n\n    def test_kernels_h_delete(self):\n        print(\"Running test_kernels_h_delete\")\n        if self.kernel_slug == \"\":\n            self.test_kernels_c_push()\n        try:\n            api.kernels_delete(self.kernel_slug, no_confirm=True)\n            # The kernels_delete method prints success, no specific return to assert.\n            # If no exception is raised, we assume success.\n        except ApiException as e:\n            self.fail(f\"kernels_delete failed: {e}\")\n\n    # Model deletion\n\n    def test_model_instance_version_d_delete(self):\n        if self.model_instance == \"\":\n            self.test_model_b_initialize()\n        try:\n            version_delete_resp = api.model_instance_version_delete(f\"{self.model_instance}/1\", True)\n            self.assertEqual(len(version_delete_resp.error), 0, msg=version_delete_resp.error)\n        except ApiException as e:\n            self.fail(f\"model_instance_version_delete failed: {e}\")\n\n    def test_model_instance_x_delete(self):\n        if self.model_instance == \"\":\n            self.test_model_b_initialize()\n        try:\n            inst_update_resp = api.model_instance_delete(self.model_instance, True)\n            self.assertIsNotNone(inst_update_resp)\n            if len(inst_update_resp.error):\n                print(inst_update_resp.error)\n            self.assertEqual(len(inst_update_resp.error), 0)\n        except ApiException as e:\n            self.fail(f\"model_instance_delete failed: {e}\")\n\n    def test_model_z_delete(self):\n        try:\n            delete_response = api.model_delete(f\"{test_user}/{model_title}\", True)\n            if delete_response.error:\n                self.fail(delete_response.error)\n            else:\n                pass\n        except ApiException as e:\n            self.fail(f\"model_delete failed: {e}\")\n\n\nif __name__ == \"__main__\":\n    unittest.main()\n"
  },
  {
    "path": "tools/cicd/integration-tests.yaml",
    "content": "steps:\n   # Access and store the secret in a file on a shared volume\n  - name: 'gcr.io/cloud-builders/gcloud'\n    id: 'download-secrets'\n    script: |\n      #!/usr/bin/env bash\n      gcloud secrets versions access latest --secret=integration-tests --project=464139560241 > /root/secrets.sh\n    volumes:\n    - name: 'root'\n      path: /root\n\n\n  # Source the secrets and run integration tests using the built Python image\n  - name: us-docker.pkg.dev/$PROJECT_ID/tools/hatch:$_PYTHON_VERSION\n    id: integration-tests\n    waitFor: ['download-secrets']\n    script: |\n      #!/usr/bin/env bash\n      export KAGGLE_USERNAME\n      export KAGGLE_KEY\n      source /root/secrets.sh\n      hatch run test:integration\n    volumes:\n    - name: 'root'\n      path: /root\n\nsubstitutions:\n  _PYTHON_VERSION: '3.11'\n"
  },
  {
    "path": "tools/releases/Dockerfile",
    "content": "FROM debian:12.0\n\n# Install some useful tools.\nRUN apt-get update -y && \\\n    apt-get install -y sudo \\\n                       curl \\\n                       unzip \\\n                       default-jre \\\n                       python3-pip\n\nCOPY requirements.txt requirements.txt\nRUN cat requirements.txt\nRUN pip install --require-hashes -r requirements.txt --break-system-packages\n\nENTRYPOINT [\"/bin/bash\"]"
  },
  {
    "path": "tools/releases/cloudbuild.yaml",
    "content": "steps:\n  # Import builder if exists.\n  # Note: the reason to use bash is to be able to return an exit code 0 even if\n  # the docker image doesn't exist yet.\n  - name: \"gcr.io/cloud-builders/docker\"\n    entrypoint: \"bash\"\n    args:\n      - \"-c\"\n      - |\n        docker pull ${_IMAGE_REPO_NAME}/${PROJECT_ID}/cli-releaser || exit 0\n\n  # Build a modified version of the python image, including tools to build and\n  # release the Kaggle CLI.\n  # Use the previous built image as cache.\n  - name: \"gcr.io/cloud-builders/docker\"\n    dir: \"tools/releases\"\n    args:\n      - build\n      - -f\n      - Dockerfile\n      - -t\n      - ${_IMAGE_REPO_NAME}/${PROJECT_ID}/cli-releaser\n      - --cache-from\n      - ${_IMAGE_REPO_NAME}/${PROJECT_ID}/cli-releaser\n      - .\n\n  - name: \"${_IMAGE_REPO_NAME}/${PROJECT_ID}/cli-releaser\"\n    id: generate-cli\n    entrypoint: bash\n    args:\n      - \"-c\"\n      - |\n        rm -f kaggle\n        cp -r src/kaggle .\n        python3 -m pip install build --break-system-packages\n        python3 -m build\n        # Move the built CLI to a volume that will survive to next steps.\n        mv dist /root/\n    volumes:\n      - name: \"root\"\n        path: /root\n\n  # Get the pypi token from Secret Manager, and create the ~/.pypirc file.\n  - name: \"gcr.io/cloud-builders/gcloud\"\n    id: create-credentials-pypirc\n    entrypoint: \"bash\"\n    args:\n      - \"-c\"\n      - |\n        token_test=$(gcloud secrets versions access latest --secret=test-pypi-token)\n        token=$(gcloud secrets versions access latest --secret=pypi-token)\n        cat >~/.pypirc <<EOL\n        [distutils]\n        index-servers =\n          pypi\n          pypitest\n        [pypi]\n        repository: https://upload.pypi.org/legacy/\n        username=__token__\n        password=${token}\n        [pypitest]\n        repository: https://test.pypi.org/legacy/\n        username=__token__\n        password=${token_test}\n        EOL\n    volumes:\n      - name: \"root\"\n        path: /root\n\n  - name: ${_IMAGE_REPO_NAME}/${PROJECT_ID}/cli-releaser\n    id: release-pypitest\n    waitFor: [\"generate-cli\", \"create-credentials-pypirc\"]\n    entrypoint: bash\n    args:\n      - \"-c\"\n      - |\n        if [ \"$_TO_TEST\" = \"false\" ] ; then\n            echo \"Deployment to pypitest disabled, set substitution _TO_TEST to true if you want otherwise.\"\n            exit 0\n        fi\n        twine upload /root/dist/* -r pypitest\n    volumes:\n      - name: \"root\"\n        path: /root\n\n  - name: ${_IMAGE_REPO_NAME}/${PROJECT_ID}/cli-releaser\n    id: release-pypi\n    waitFor: [\"release-pypitest\"]\n    entrypoint: bash\n    args:\n      - \"-c\"\n      - |\n        if [ \"$_TO_PROD\" = \"false\" ] ; then\n            echo \"Deployment to pypi disabled, set substitution _TO_PROD to true if you want otherwise.\"\n            exit 0\n        fi\n        twine upload /root/dist/* -r pypi\n    volumes:\n      - name: \"root\"\n        path: /root\n\nimages: [\"${_IMAGE_REPO_NAME}/${PROJECT_ID}/cli-releaser\"]\n\nsubstitutions:\n  _IMAGE_REPO_NAME: us-docker.pkg.dev/kaggle-cicd/tools\n  _TO_TEST: \"false\"\n  _TO_PROD: \"false\"\n"
  },
  {
    "path": "tools/releases/requirements.in",
    "content": "twine==6.0.1\npkginfo==1.12.0"
  },
  {
    "path": "tools/releases/requirements.txt",
    "content": "#\n# This file is autogenerated by pip-compile with Python 3.11\n# by the following command:\n#\n#    pip-compile --generate-hashes requirements.in\n#\ncertifi==2024.7.4 \\\n    --hash=sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b \\\n    --hash=sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90\n    # via requests\ncffi==2.0.0 \\\n    --hash=sha256:00bdf7acc5f795150faa6957054fbbca2439db2f775ce831222b66f192f03beb \\\n    --hash=sha256:07b271772c100085dd28b74fa0cd81c8fb1a3ba18b21e03d7c27f3436a10606b \\\n    --hash=sha256:087067fa8953339c723661eda6b54bc98c5625757ea62e95eb4898ad5e776e9f \\\n    --hash=sha256:0a1527a803f0a659de1af2e1fd700213caba79377e27e4693648c2923da066f9 \\\n    --hash=sha256:0cf2d91ecc3fcc0625c2c530fe004f82c110405f101548512cce44322fa8ac44 \\\n    --hash=sha256:0f6084a0ea23d05d20c3edcda20c3d006f9b6f3fefeac38f59262e10cef47ee2 \\\n    --hash=sha256:12873ca6cb9b0f0d3a0da705d6086fe911591737a59f28b7936bdfed27c0d47c \\\n    --hash=sha256:19f705ada2530c1167abacb171925dd886168931e0a7b78f5bffcae5c6b5be75 \\\n    --hash=sha256:1cd13c99ce269b3ed80b417dcd591415d3372bcac067009b6e0f59c7d4015e65 \\\n    --hash=sha256:1e3a615586f05fc4065a8b22b8152f0c1b00cdbc60596d187c2a74f9e3036e4e \\\n    --hash=sha256:1f72fb8906754ac8a2cc3f9f5aaa298070652a0ffae577e0ea9bd480dc3c931a \\\n    --hash=sha256:1fc9ea04857caf665289b7a75923f2c6ed559b8298a1b8c49e59f7dd95c8481e \\\n    --hash=sha256:203a48d1fb583fc7d78a4c6655692963b860a417c0528492a6bc21f1aaefab25 \\\n    --hash=sha256:2081580ebb843f759b9f617314a24ed5738c51d2aee65d31e02f6f7a2b97707a \\\n    --hash=sha256:21d1152871b019407d8ac3985f6775c079416c282e431a4da6afe7aefd2bccbe \\\n    --hash=sha256:24b6f81f1983e6df8db3adc38562c83f7d4a0c36162885ec7f7b77c7dcbec97b \\\n    --hash=sha256:256f80b80ca3853f90c21b23ee78cd008713787b1b1e93eae9f3d6a7134abd91 \\\n    --hash=sha256:28a3a209b96630bca57cce802da70c266eb08c6e97e5afd61a75611ee6c64592 \\\n    --hash=sha256:2c8f814d84194c9ea681642fd164267891702542f028a15fc97d4674b6206187 \\\n    --hash=sha256:2de9a304e27f7596cd03d16f1b7c72219bd944e99cc52b84d0145aefb07cbd3c \\\n    --hash=sha256:38100abb9d1b1435bc4cc340bb4489635dc2f0da7456590877030c9b3d40b0c1 \\\n    --hash=sha256:3925dd22fa2b7699ed2617149842d2e6adde22b262fcbfada50e3d195e4b3a94 \\\n    --hash=sha256:3e17ed538242334bf70832644a32a7aae3d83b57567f9fd60a26257e992b79ba \\\n    --hash=sha256:3e837e369566884707ddaf85fc1744b47575005c0a229de3327f8f9a20f4efeb \\\n    --hash=sha256:3f4d46d8b35698056ec29bca21546e1551a205058ae1a181d871e278b0b28165 \\\n    --hash=sha256:44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529 \\\n    --hash=sha256:45d5e886156860dc35862657e1494b9bae8dfa63bf56796f2fb56e1679fc0bca \\\n    --hash=sha256:4647afc2f90d1ddd33441e5b0e85b16b12ddec4fca55f0d9671fef036ecca27c \\\n    --hash=sha256:4671d9dd5ec934cb9a73e7ee9676f9362aba54f7f34910956b84d727b0d73fb6 \\\n    --hash=sha256:53f77cbe57044e88bbd5ed26ac1d0514d2acf0591dd6bb02a3ae37f76811b80c \\\n    --hash=sha256:5eda85d6d1879e692d546a078b44251cdd08dd1cfb98dfb77b670c97cee49ea0 \\\n    --hash=sha256:5fed36fccc0612a53f1d4d9a816b50a36702c28a2aa880cb8a122b3466638743 \\\n    --hash=sha256:61d028e90346df14fedc3d1e5441df818d095f3b87d286825dfcbd6459b7ef63 \\\n    --hash=sha256:66f011380d0e49ed280c789fbd08ff0d40968ee7b665575489afa95c98196ab5 \\\n    --hash=sha256:6824f87845e3396029f3820c206e459ccc91760e8fa24422f8b0c3d1731cbec5 \\\n    --hash=sha256:6c6c373cfc5c83a975506110d17457138c8c63016b563cc9ed6e056a82f13ce4 \\\n    --hash=sha256:6d02d6655b0e54f54c4ef0b94eb6be0607b70853c45ce98bd278dc7de718be5d \\\n    --hash=sha256:6d50360be4546678fc1b79ffe7a66265e28667840010348dd69a314145807a1b \\\n    --hash=sha256:730cacb21e1bdff3ce90babf007d0a0917cc3e6492f336c2f0134101e0944f93 \\\n    --hash=sha256:737fe7d37e1a1bffe70bd5754ea763a62a066dc5913ca57e957824b72a85e205 \\\n    --hash=sha256:74a03b9698e198d47562765773b4a8309919089150a0bb17d829ad7b44b60d27 \\\n    --hash=sha256:7553fb2090d71822f02c629afe6042c299edf91ba1bf94951165613553984512 \\\n    --hash=sha256:7a66c7204d8869299919db4d5069a82f1561581af12b11b3c9f48c584eb8743d \\\n    --hash=sha256:7cc09976e8b56f8cebd752f7113ad07752461f48a58cbba644139015ac24954c \\\n    --hash=sha256:81afed14892743bbe14dacb9e36d9e0e504cd204e0b165062c488942b9718037 \\\n    --hash=sha256:8941aaadaf67246224cee8c3803777eed332a19d909b47e29c9842ef1e79ac26 \\\n    --hash=sha256:89472c9762729b5ae1ad974b777416bfda4ac5642423fa93bd57a09204712322 \\\n    --hash=sha256:8ea985900c5c95ce9db1745f7933eeef5d314f0565b27625d9a10ec9881e1bfb \\\n    --hash=sha256:8eca2a813c1cb7ad4fb74d368c2ffbbb4789d377ee5bb8df98373c2cc0dee76c \\\n    --hash=sha256:92b68146a71df78564e4ef48af17551a5ddd142e5190cdf2c5624d0c3ff5b2e8 \\\n    --hash=sha256:9332088d75dc3241c702d852d4671613136d90fa6881da7d770a483fd05248b4 \\\n    --hash=sha256:94698a9c5f91f9d138526b48fe26a199609544591f859c870d477351dc7b2414 \\\n    --hash=sha256:9a67fc9e8eb39039280526379fb3a70023d77caec1852002b4da7e8b270c4dd9 \\\n    --hash=sha256:9de40a7b0323d889cf8d23d1ef214f565ab154443c42737dfe52ff82cf857664 \\\n    --hash=sha256:a05d0c237b3349096d3981b727493e22147f934b20f6f125a3eba8f994bec4a9 \\\n    --hash=sha256:afb8db5439b81cf9c9d0c80404b60c3cc9c3add93e114dcae767f1477cb53775 \\\n    --hash=sha256:b18a3ed7d5b3bd8d9ef7a8cb226502c6bf8308df1525e1cc676c3680e7176739 \\\n    --hash=sha256:b1e74d11748e7e98e2f426ab176d4ed720a64412b6a15054378afdb71e0f37dc \\\n    --hash=sha256:b21e08af67b8a103c71a250401c78d5e0893beff75e28c53c98f4de42f774062 \\\n    --hash=sha256:b4c854ef3adc177950a8dfc81a86f5115d2abd545751a304c5bcf2c2c7283cfe \\\n    --hash=sha256:b882b3df248017dba09d6b16defe9b5c407fe32fc7c65a9c69798e6175601be9 \\\n    --hash=sha256:baf5215e0ab74c16e2dd324e8ec067ef59e41125d3eade2b863d294fd5035c92 \\\n    --hash=sha256:c649e3a33450ec82378822b3dad03cc228b8f5963c0c12fc3b1e0ab940f768a5 \\\n    --hash=sha256:c654de545946e0db659b3400168c9ad31b5d29593291482c43e3564effbcee13 \\\n    --hash=sha256:c6638687455baf640e37344fe26d37c404db8b80d037c3d29f58fe8d1c3b194d \\\n    --hash=sha256:c8d3b5532fc71b7a77c09192b4a5a200ea992702734a2e9279a37f2478236f26 \\\n    --hash=sha256:cb527a79772e5ef98fb1d700678fe031e353e765d1ca2d409c92263c6d43e09f \\\n    --hash=sha256:cf364028c016c03078a23b503f02058f1814320a56ad535686f90565636a9495 \\\n    --hash=sha256:d48a880098c96020b02d5a1f7d9251308510ce8858940e6fa99ece33f610838b \\\n    --hash=sha256:d68b6cef7827e8641e8ef16f4494edda8b36104d79773a334beaa1e3521430f6 \\\n    --hash=sha256:d9b29c1f0ae438d5ee9acb31cadee00a58c46cc9c0b2f9038c6b0b3470877a8c \\\n    --hash=sha256:d9b97165e8aed9272a6bb17c01e3cc5871a594a446ebedc996e2397a1c1ea8ef \\\n    --hash=sha256:da68248800ad6320861f129cd9c1bf96ca849a2771a59e0344e88681905916f5 \\\n    --hash=sha256:da902562c3e9c550df360bfa53c035b2f241fed6d9aef119048073680ace4a18 \\\n    --hash=sha256:dbd5c7a25a7cb98f5ca55d258b103a2054f859a46ae11aaf23134f9cc0d356ad \\\n    --hash=sha256:dd4f05f54a52fb558f1ba9f528228066954fee3ebe629fc1660d874d040ae5a3 \\\n    --hash=sha256:de8dad4425a6ca6e4e5e297b27b5c824ecc7581910bf9aee86cb6835e6812aa7 \\\n    --hash=sha256:e11e82b744887154b182fd3e7e8512418446501191994dbf9c9fc1f32cc8efd5 \\\n    --hash=sha256:e6e73b9e02893c764e7e8d5bb5ce277f1a009cd5243f8228f75f842bf937c534 \\\n    --hash=sha256:f73b96c41e3b2adedc34a7356e64c8eb96e03a3782b535e043a986276ce12a49 \\\n    --hash=sha256:f93fd8e5c8c0a4aa1f424d6173f14a892044054871c771f8566e4008eaa359d2 \\\n    --hash=sha256:fc33c5141b55ed366cfaad382df24fe7dcbc686de5be719b207bb248e3053dc5 \\\n    --hash=sha256:fc7de24befaeae77ba923797c7c87834c73648a05a4bde34b3b7e5588973a453 \\\n    --hash=sha256:fe562eb1a64e67dd297ccc4f5addea2501664954f2692b69a76449ec7913ecbf\n    # via cryptography\ncharset-normalizer==3.2.0 \\\n    --hash=sha256:04e57ab9fbf9607b77f7d057974694b4f6b142da9ed4a199859d9d4d5c63fe96 \\\n    --hash=sha256:09393e1b2a9461950b1c9a45d5fd251dc7c6f228acab64da1c9c0165d9c7765c \\\n    --hash=sha256:0b87549028f680ca955556e3bd57013ab47474c3124dc069faa0b6545b6c9710 \\\n    --hash=sha256:1000fba1057b92a65daec275aec30586c3de2401ccdcd41f8a5c1e2c87078706 \\\n    --hash=sha256:1249cbbf3d3b04902ff081ffbb33ce3377fa6e4c7356f759f3cd076cc138d020 \\\n    --hash=sha256:1920d4ff15ce893210c1f0c0e9d19bfbecb7983c76b33f046c13a8ffbd570252 \\\n    --hash=sha256:193cbc708ea3aca45e7221ae58f0fd63f933753a9bfb498a3b474878f12caaad \\\n    --hash=sha256:1a100c6d595a7f316f1b6f01d20815d916e75ff98c27a01ae817439ea7726329 \\\n    --hash=sha256:1f30b48dd7fa1474554b0b0f3fdfdd4c13b5c737a3c6284d3cdc424ec0ffff3a \\\n    --hash=sha256:203f0c8871d5a7987be20c72442488a0b8cfd0f43b7973771640fc593f56321f \\\n    --hash=sha256:246de67b99b6851627d945db38147d1b209a899311b1305dd84916f2b88526c6 \\\n    --hash=sha256:2dee8e57f052ef5353cf608e0b4c871aee320dd1b87d351c28764fc0ca55f9f4 \\\n    --hash=sha256:2efb1bd13885392adfda4614c33d3b68dee4921fd0ac1d3988f8cbb7d589e72a \\\n    --hash=sha256:2f4ac36d8e2b4cc1aa71df3dd84ff8efbe3bfb97ac41242fbcfc053c67434f46 \\\n    --hash=sha256:3170c9399da12c9dc66366e9d14da8bf7147e1e9d9ea566067bbce7bb74bd9c2 \\\n    --hash=sha256:3b1613dd5aee995ec6d4c69f00378bbd07614702a315a2cf6c1d21461fe17c23 \\\n    --hash=sha256:3bb3d25a8e6c0aedd251753a79ae98a093c7e7b471faa3aa9a93a81431987ace \\\n    --hash=sha256:3bb7fda7260735efe66d5107fb7e6af6a7c04c7fce9b2514e04b7a74b06bf5dd \\\n    --hash=sha256:41b25eaa7d15909cf3ac4c96088c1f266a9a93ec44f87f1d13d4a0e86c81b982 \\\n    --hash=sha256:45de3f87179c1823e6d9e32156fb14c1927fcc9aba21433f088fdfb555b77c10 \\\n    --hash=sha256:46fb8c61d794b78ec7134a715a3e564aafc8f6b5e338417cb19fe9f57a5a9bf2 \\\n    --hash=sha256:48021783bdf96e3d6de03a6e39a1171ed5bd7e8bb93fc84cc649d11490f87cea \\\n    --hash=sha256:4957669ef390f0e6719db3613ab3a7631e68424604a7b448f079bee145da6e09 \\\n    --hash=sha256:5e86d77b090dbddbe78867a0275cb4df08ea195e660f1f7f13435a4649e954e5 \\\n    --hash=sha256:6339d047dab2780cc6220f46306628e04d9750f02f983ddb37439ca47ced7149 \\\n    --hash=sha256:681eb3d7e02e3c3655d1b16059fbfb605ac464c834a0c629048a30fad2b27489 \\\n    --hash=sha256:6c409c0deba34f147f77efaa67b8e4bb83d2f11c8806405f76397ae5b8c0d1c9 \\\n    --hash=sha256:7095f6fbfaa55defb6b733cfeb14efaae7a29f0b59d8cf213be4e7ca0b857b80 \\\n    --hash=sha256:70c610f6cbe4b9fce272c407dd9d07e33e6bf7b4aa1b7ffb6f6ded8e634e3592 \\\n    --hash=sha256:72814c01533f51d68702802d74f77ea026b5ec52793c791e2da806a3844a46c3 \\\n    --hash=sha256:7a4826ad2bd6b07ca615c74ab91f32f6c96d08f6fcc3902ceeedaec8cdc3bcd6 \\\n    --hash=sha256:7c70087bfee18a42b4040bb9ec1ca15a08242cf5867c58726530bdf3945672ed \\\n    --hash=sha256:855eafa5d5a2034b4621c74925d89c5efef61418570e5ef9b37717d9c796419c \\\n    --hash=sha256:8700f06d0ce6f128de3ccdbc1acaea1ee264d2caa9ca05daaf492fde7c2a7200 \\\n    --hash=sha256:89f1b185a01fe560bc8ae5f619e924407efca2191b56ce749ec84982fc59a32a \\\n    --hash=sha256:8b2c760cfc7042b27ebdb4a43a4453bd829a5742503599144d54a032c5dc7e9e \\\n    --hash=sha256:8c2f5e83493748286002f9369f3e6607c565a6a90425a3a1fef5ae32a36d749d \\\n    --hash=sha256:8e098148dd37b4ce3baca71fb394c81dc5d9c7728c95df695d2dca218edf40e6 \\\n    --hash=sha256:94aea8eff76ee6d1cdacb07dd2123a68283cb5569e0250feab1240058f53b623 \\\n    --hash=sha256:95eb302ff792e12aba9a8b8f8474ab229a83c103d74a750ec0bd1c1eea32e669 \\\n    --hash=sha256:9bd9b3b31adcb054116447ea22caa61a285d92e94d710aa5ec97992ff5eb7cf3 \\\n    --hash=sha256:9e608aafdb55eb9f255034709e20d5a83b6d60c054df0802fa9c9883d0a937aa \\\n    --hash=sha256:a103b3a7069b62f5d4890ae1b8f0597618f628b286b03d4bc9195230b154bfa9 \\\n    --hash=sha256:a386ebe437176aab38c041de1260cd3ea459c6ce5263594399880bbc398225b2 \\\n    --hash=sha256:a38856a971c602f98472050165cea2cdc97709240373041b69030be15047691f \\\n    --hash=sha256:a401b4598e5d3f4a9a811f3daf42ee2291790c7f9d74b18d75d6e21dda98a1a1 \\\n    --hash=sha256:a7647ebdfb9682b7bb97e2a5e7cb6ae735b1c25008a70b906aecca294ee96cf4 \\\n    --hash=sha256:aaf63899c94de41fe3cf934601b0f7ccb6b428c6e4eeb80da72c58eab077b19a \\\n    --hash=sha256:b0dac0ff919ba34d4df1b6131f59ce95b08b9065233446be7e459f95554c0dc8 \\\n    --hash=sha256:baacc6aee0b2ef6f3d308e197b5d7a81c0e70b06beae1f1fcacffdbd124fe0e3 \\\n    --hash=sha256:bf420121d4c8dce6b889f0e8e4ec0ca34b7f40186203f06a946fa0276ba54029 \\\n    --hash=sha256:c04a46716adde8d927adb9457bbe39cf473e1e2c2f5d0a16ceb837e5d841ad4f \\\n    --hash=sha256:c0b21078a4b56965e2b12f247467b234734491897e99c1d51cee628da9786959 \\\n    --hash=sha256:c1c76a1743432b4b60ab3358c937a3fe1341c828ae6194108a94c69028247f22 \\\n    --hash=sha256:c4983bf937209c57240cff65906b18bb35e64ae872da6a0db937d7b4af845dd7 \\\n    --hash=sha256:c4fb39a81950ec280984b3a44f5bd12819953dc5fa3a7e6fa7a80db5ee853952 \\\n    --hash=sha256:c57921cda3a80d0f2b8aec7e25c8aa14479ea92b5b51b6876d975d925a2ea346 \\\n    --hash=sha256:c8063cf17b19661471ecbdb3df1c84f24ad2e389e326ccaf89e3fb2484d8dd7e \\\n    --hash=sha256:ccd16eb18a849fd8dcb23e23380e2f0a354e8daa0c984b8a732d9cfaba3a776d \\\n    --hash=sha256:cd6dbe0238f7743d0efe563ab46294f54f9bc8f4b9bcf57c3c666cc5bc9d1299 \\\n    --hash=sha256:d62e51710986674142526ab9f78663ca2b0726066ae26b78b22e0f5e571238dd \\\n    --hash=sha256:db901e2ac34c931d73054d9797383d0f8009991e723dab15109740a63e7f902a \\\n    --hash=sha256:e03b8895a6990c9ab2cdcd0f2fe44088ca1c65ae592b8f795c3294af00a461c3 \\\n    --hash=sha256:e1c8a2f4c69e08e89632defbfabec2feb8a8d99edc9f89ce33c4b9e36ab63037 \\\n    --hash=sha256:e4b749b9cc6ee664a3300bb3a273c1ca8068c46be705b6c31cf5d276f8628a94 \\\n    --hash=sha256:e6a5bf2cba5ae1bb80b154ed68a3cfa2fa00fde979a7f50d6598d3e17d9ac20c \\\n    --hash=sha256:e857a2232ba53ae940d3456f7533ce6ca98b81917d47adc3c7fd55dad8fab858 \\\n    --hash=sha256:ee4006268ed33370957f55bf2e6f4d263eaf4dc3cfc473d1d90baff6ed36ce4a \\\n    --hash=sha256:eef9df1eefada2c09a5e7a40991b9fc6ac6ef20b1372abd48d2794a316dc0449 \\\n    --hash=sha256:f058f6963fd82eb143c692cecdc89e075fa0828db2e5b291070485390b2f1c9c \\\n    --hash=sha256:f25c229a6ba38a35ae6e25ca1264621cc25d4d38dca2942a7fce0b67a4efe918 \\\n    --hash=sha256:f2a1d0fd4242bd8643ce6f98927cf9c04540af6efa92323e9d3124f57727bfc1 \\\n    --hash=sha256:f7560358a6811e52e9c4d142d497f1a6e10103d3a6881f18d04dbce3729c0e2c \\\n    --hash=sha256:f779d3ad205f108d14e99bb3859aa7dd8e9c68874617c72354d7ecaec2a054ac \\\n    --hash=sha256:f87f746ee241d30d6ed93969de31e5ffd09a2961a051e60ae6bddde9ec3583aa\n    # via requests\ncryptography==46.0.5 \\\n    --hash=sha256:02f547fce831f5096c9a567fd41bc12ca8f11df260959ecc7c3202555cc47a72 \\\n    --hash=sha256:02f547fce831f5096c9a567fd41bc12ca8f11df260959ecc7c3202555cc47a72 \\\n    --hash=sha256:039917b0dc418bb9f6edce8a906572d69e74bd330b0b3fea4f79dab7f8ddd235 \\\n    --hash=sha256:039917b0dc418bb9f6edce8a906572d69e74bd330b0b3fea4f79dab7f8ddd235 \\\n    --hash=sha256:1abfdb89b41c3be0365328a410baa9df3ff8a9110fb75e7b52e66803ddabc9a9 \\\n    --hash=sha256:1abfdb89b41c3be0365328a410baa9df3ff8a9110fb75e7b52e66803ddabc9a9 \\\n    --hash=sha256:2ae6971afd6246710480e3f15824ed3029a60fc16991db250034efd0b9fb4356 \\\n    --hash=sha256:2ae6971afd6246710480e3f15824ed3029a60fc16991db250034efd0b9fb4356 \\\n    --hash=sha256:2b7a67c9cd56372f3249b39699f2ad479f6991e62ea15800973b956f4b73e257 \\\n    --hash=sha256:2b7a67c9cd56372f3249b39699f2ad479f6991e62ea15800973b956f4b73e257 \\\n    --hash=sha256:351695ada9ea9618b3500b490ad54c739860883df6c1f555e088eaf25b1bbaad \\\n    --hash=sha256:351695ada9ea9618b3500b490ad54c739860883df6c1f555e088eaf25b1bbaad \\\n    --hash=sha256:38946c54b16c885c72c4f59846be9743d699eee2b69b6988e0a00a01f46a61a4 \\\n    --hash=sha256:38946c54b16c885c72c4f59846be9743d699eee2b69b6988e0a00a01f46a61a4 \\\n    --hash=sha256:3b4995dc971c9fb83c25aa44cf45f02ba86f71ee600d81091c2f0cbae116b06c \\\n    --hash=sha256:3b4995dc971c9fb83c25aa44cf45f02ba86f71ee600d81091c2f0cbae116b06c \\\n    --hash=sha256:3ce58ba46e1bc2aac4f7d9290223cead56743fa6ab94a5d53292ffaac6a91614 \\\n    --hash=sha256:3ce58ba46e1bc2aac4f7d9290223cead56743fa6ab94a5d53292ffaac6a91614 \\\n    --hash=sha256:3ee190460e2fbe447175cda91b88b84ae8322a104fc27766ad09428754a618ed \\\n    --hash=sha256:3ee190460e2fbe447175cda91b88b84ae8322a104fc27766ad09428754a618ed \\\n    --hash=sha256:4108d4c09fbbf2789d0c926eb4152ae1760d5a2d97612b92d508d96c861e4d31 \\\n    --hash=sha256:4108d4c09fbbf2789d0c926eb4152ae1760d5a2d97612b92d508d96c861e4d31 \\\n    --hash=sha256:420d0e909050490d04359e7fdb5ed7e667ca5c3c402b809ae2563d7e66a92229 \\\n    --hash=sha256:420d0e909050490d04359e7fdb5ed7e667ca5c3c402b809ae2563d7e66a92229 \\\n    --hash=sha256:47fb8a66058b80e509c47118ef8a75d14c455e81ac369050f20ba0d23e77fee0 \\\n    --hash=sha256:47fb8a66058b80e509c47118ef8a75d14c455e81ac369050f20ba0d23e77fee0 \\\n    --hash=sha256:4c3341037c136030cb46e4b1e17b7418ea4cbd9dd207e4a6f3b2b24e0d4ac731 \\\n    --hash=sha256:4c3341037c136030cb46e4b1e17b7418ea4cbd9dd207e4a6f3b2b24e0d4ac731 \\\n    --hash=sha256:4d7e3d356b8cd4ea5aff04f129d5f66ebdc7b6f8eae802b93739ed520c47c79b \\\n    --hash=sha256:4d7e3d356b8cd4ea5aff04f129d5f66ebdc7b6f8eae802b93739ed520c47c79b \\\n    --hash=sha256:4d8ae8659ab18c65ced284993c2265910f6c9e650189d4e3f68445ef82a810e4 \\\n    --hash=sha256:4d8ae8659ab18c65ced284993c2265910f6c9e650189d4e3f68445ef82a810e4 \\\n    --hash=sha256:4e817a8920bfbcff8940ecfd60f23d01836408242b30f1a708d93198393a80b4 \\\n    --hash=sha256:4e817a8920bfbcff8940ecfd60f23d01836408242b30f1a708d93198393a80b4 \\\n    --hash=sha256:50bfb6925eff619c9c023b967d5b77a54e04256c4281b0e21336a130cd7fc263 \\\n    --hash=sha256:50bfb6925eff619c9c023b967d5b77a54e04256c4281b0e21336a130cd7fc263 \\\n    --hash=sha256:556e106ee01aa13484ce9b0239bca667be5004efb0aabbed28d353df86445595 \\\n    --hash=sha256:556e106ee01aa13484ce9b0239bca667be5004efb0aabbed28d353df86445595 \\\n    --hash=sha256:582f5fcd2afa31622f317f80426a027f30dc792e9c80ffee87b993200ea115f1 \\\n    --hash=sha256:582f5fcd2afa31622f317f80426a027f30dc792e9c80ffee87b993200ea115f1 \\\n    --hash=sha256:5be7bf2fb40769e05739dd0046e7b26f9d4670badc7b032d6ce4db64dddc0678 \\\n    --hash=sha256:5be7bf2fb40769e05739dd0046e7b26f9d4670badc7b032d6ce4db64dddc0678 \\\n    --hash=sha256:60ee7e19e95104d4c03871d7d7dfb3d22ef8a9b9c6778c94e1c8fcc8365afd48 \\\n    --hash=sha256:60ee7e19e95104d4c03871d7d7dfb3d22ef8a9b9c6778c94e1c8fcc8365afd48 \\\n    --hash=sha256:61aa400dce22cb001a98014f647dc21cda08f7915ceb95df0c9eaf84b4b6af76 \\\n    --hash=sha256:61aa400dce22cb001a98014f647dc21cda08f7915ceb95df0c9eaf84b4b6af76 \\\n    --hash=sha256:68f68d13f2e1cb95163fa3b4db4bf9a159a418f5f6e7242564fc75fcae667fd0 \\\n    --hash=sha256:68f68d13f2e1cb95163fa3b4db4bf9a159a418f5f6e7242564fc75fcae667fd0 \\\n    --hash=sha256:7d1f30a86d2757199cb2d56e48cce14deddf1f9c95f1ef1b64ee91ea43fe2e18 \\\n    --hash=sha256:7d1f30a86d2757199cb2d56e48cce14deddf1f9c95f1ef1b64ee91ea43fe2e18 \\\n    --hash=sha256:7d731d4b107030987fd61a7f8ab512b25b53cef8f233a97379ede116f30eb67d \\\n    --hash=sha256:7d731d4b107030987fd61a7f8ab512b25b53cef8f233a97379ede116f30eb67d \\\n    --hash=sha256:803812e111e75d1aa73690d2facc295eaefd4439be1023fefc4995eaea2af90d \\\n    --hash=sha256:803812e111e75d1aa73690d2facc295eaefd4439be1023fefc4995eaea2af90d \\\n    --hash=sha256:80a8d7bfdf38f87ca30a5391c0c9ce4ed2926918e017c29ddf643d0ed2778ea1 \\\n    --hash=sha256:80a8d7bfdf38f87ca30a5391c0c9ce4ed2926918e017c29ddf643d0ed2778ea1 \\\n    --hash=sha256:8293f3dea7fc929ef7240796ba231413afa7b68ce38fd21da2995549f5961981 \\\n    --hash=sha256:8293f3dea7fc929ef7240796ba231413afa7b68ce38fd21da2995549f5961981 \\\n    --hash=sha256:8456928655f856c6e1533ff59d5be76578a7157224dbd9ce6872f25055ab9ab7 \\\n    --hash=sha256:8456928655f856c6e1533ff59d5be76578a7157224dbd9ce6872f25055ab9ab7 \\\n    --hash=sha256:890bcb4abd5a2d3f852196437129eb3667d62630333aacc13dfd470fad3aaa82 \\\n    --hash=sha256:890bcb4abd5a2d3f852196437129eb3667d62630333aacc13dfd470fad3aaa82 \\\n    --hash=sha256:94a76daa32eb78d61339aff7952ea819b1734b46f73646a07decb40e5b3448e2 \\\n    --hash=sha256:94a76daa32eb78d61339aff7952ea819b1734b46f73646a07decb40e5b3448e2 \\\n    --hash=sha256:9f16fbdf4da055efb21c22d81b89f155f02ba420558db21288b3d0035bafd5f4 \\\n    --hash=sha256:9f16fbdf4da055efb21c22d81b89f155f02ba420558db21288b3d0035bafd5f4 \\\n    --hash=sha256:a3d1fae9863299076f05cb8a778c467578262fae09f9dc0ee9b12eb4268ce663 \\\n    --hash=sha256:a3d1fae9863299076f05cb8a778c467578262fae09f9dc0ee9b12eb4268ce663 \\\n    --hash=sha256:a3d507bb6a513ca96ba84443226af944b0f7f47dcc9a399d110cd6146481d24c \\\n    --hash=sha256:a3d507bb6a513ca96ba84443226af944b0f7f47dcc9a399d110cd6146481d24c \\\n    --hash=sha256:abace499247268e3757271b2f1e244b36b06f8515cf27c4d49468fc9eb16e93d \\\n    --hash=sha256:abace499247268e3757271b2f1e244b36b06f8515cf27c4d49468fc9eb16e93d \\\n    --hash=sha256:ba2a27ff02f48193fc4daeadf8ad2590516fa3d0adeeb34336b96f7fa64c1e3a \\\n    --hash=sha256:ba2a27ff02f48193fc4daeadf8ad2590516fa3d0adeeb34336b96f7fa64c1e3a \\\n    --hash=sha256:bc84e875994c3b445871ea7181d424588171efec3e185dced958dad9e001950a \\\n    --hash=sha256:bc84e875994c3b445871ea7181d424588171efec3e185dced958dad9e001950a \\\n    --hash=sha256:bfd56bb4b37ed4f330b82402f6f435845a5f5648edf1ad497da51a8452d5d62d \\\n    --hash=sha256:bfd56bb4b37ed4f330b82402f6f435845a5f5648edf1ad497da51a8452d5d62d \\\n    --hash=sha256:c18ff11e86df2e28854939acde2d003f7984f721eba450b56a200ad90eeb0e6b \\\n    --hash=sha256:c18ff11e86df2e28854939acde2d003f7984f721eba450b56a200ad90eeb0e6b \\\n    --hash=sha256:c3bcce8521d785d510b2aad26ae2c966092b7daa8f45dd8f44734a104dc0bc1a \\\n    --hash=sha256:c3bcce8521d785d510b2aad26ae2c966092b7daa8f45dd8f44734a104dc0bc1a \\\n    --hash=sha256:c4143987a42a2397f2fc3b4d7e3a7d313fbe684f67ff443999e803dd75a76826 \\\n    --hash=sha256:c4143987a42a2397f2fc3b4d7e3a7d313fbe684f67ff443999e803dd75a76826 \\\n    --hash=sha256:c69fd885df7d089548a42d5ec05be26050ebcd2283d89b3d30676eb32ff87dee \\\n    --hash=sha256:c69fd885df7d089548a42d5ec05be26050ebcd2283d89b3d30676eb32ff87dee \\\n    --hash=sha256:ced80795227d70549a411a4ab66e8ce307899fad2220ce5ab2f296e687eacde9 \\\n    --hash=sha256:ced80795227d70549a411a4ab66e8ce307899fad2220ce5ab2f296e687eacde9 \\\n    --hash=sha256:d66e421495fdb797610a08f43b05269e0a5ea7f5e652a89bfd5a7d3c1dee3648 \\\n    --hash=sha256:d66e421495fdb797610a08f43b05269e0a5ea7f5e652a89bfd5a7d3c1dee3648 \\\n    --hash=sha256:d861ee9e76ace6cf36a6a89b959ec08e7bc2493ee39d07ffe5acb23ef46d27da \\\n    --hash=sha256:d861ee9e76ace6cf36a6a89b959ec08e7bc2493ee39d07ffe5acb23ef46d27da \\\n    --hash=sha256:e9251e3be159d1020c4030bd2e5f84d6a43fe54b6c19c12f51cde9542a2817b2 \\\n    --hash=sha256:e9251e3be159d1020c4030bd2e5f84d6a43fe54b6c19c12f51cde9542a2817b2 \\\n    --hash=sha256:f145bba11b878005c496e93e257c1e88f154d278d2638e6450d17e0f31e558d2 \\\n    --hash=sha256:f145bba11b878005c496e93e257c1e88f154d278d2638e6450d17e0f31e558d2 \\\n    --hash=sha256:fe346b143ff9685e40192a4960938545c699054ba11d4f9029f94751e3f71d87 \\\n    --hash=sha256:fe346b143ff9685e40192a4960938545c699054ba11d4f9029f94751e3f71d87\n    # via secretstorage\ndocutils==0.20.1 \\\n    --hash=sha256:96f387a2c5562db4476f09f13bbab2192e764cac08ebbf3a34a95d9b1e4a59d6 \\\n    --hash=sha256:f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b\n    # via readme-renderer\nidna==3.7 \\\n    --hash=sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc \\\n    --hash=sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0\n    # via requests\nimportlib-metadata==6.8.0 \\\n    --hash=sha256:3ebb78df84a805d7698245025b975d9d67053cd94c79245ba4b3eb694abe68bb \\\n    --hash=sha256:dbace7892d8c0c4ac1ad096662232f831d4e64f4c4545bd53016a3e9d4654743\n    # via keyring\njaraco-classes==3.3.0 \\\n    --hash=sha256:10afa92b6743f25c0cf5f37c6bb6e18e2c5bb84a16527ccfc0040ea377e7aaeb \\\n    --hash=sha256:c063dd08e89217cee02c8d5e5ec560f2c8ce6cdc2fcdc2e68f7b2e5547ed3621\n    # via keyring\njeepney==0.8.0 \\\n    --hash=sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806 \\\n    --hash=sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755\n    # via\n    #   keyring\n    #   secretstorage\nkeyring==24.2.0 \\\n    --hash=sha256:4901caaf597bfd3bbd78c9a0c7c4c29fcd8310dab2cffefe749e916b6527acd6 \\\n    --hash=sha256:ca0746a19ec421219f4d713f848fa297a661a8a8c1504867e55bfb5e09091509\n    # via twine\nmarkdown-it-py==3.0.0 \\\n    --hash=sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1 \\\n    --hash=sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb\n    # via rich\nmdurl==0.1.2 \\\n    --hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 \\\n    --hash=sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba\n    # via markdown-it-py\nmore-itertools==10.1.0 \\\n    --hash=sha256:626c369fa0eb37bac0291bce8259b332fd59ac792fa5497b59837309cd5b114a \\\n    --hash=sha256:64e0735fcfdc6f3464ea133afe8ea4483b1c5fe3a3d69852e6503b43a0b222e6\n    # via jaraco-classes\nnh3==0.2.14 \\\n    --hash=sha256:116c9515937f94f0057ef50ebcbcc10600860065953ba56f14473ff706371873 \\\n    --hash=sha256:18415df36db9b001f71a42a3a5395db79cf23d556996090d293764436e98e8ad \\\n    --hash=sha256:203cac86e313cf6486704d0ec620a992c8bc164c86d3a4fd3d761dd552d839b5 \\\n    --hash=sha256:2b0be5c792bd43d0abef8ca39dd8acb3c0611052ce466d0401d51ea0d9aa7525 \\\n    --hash=sha256:377aaf6a9e7c63962f367158d808c6a1344e2b4f83d071c43fbd631b75c4f0b2 \\\n    --hash=sha256:525846c56c2bcd376f5eaee76063ebf33cf1e620c1498b2a40107f60cfc6054e \\\n    --hash=sha256:5529a3bf99402c34056576d80ae5547123f1078da76aa99e8ed79e44fa67282d \\\n    --hash=sha256:7771d43222b639a4cd9e341f870cee336b9d886de1ad9bec8dddab22fe1de450 \\\n    --hash=sha256:88c753efbcdfc2644a5012938c6b9753f1c64a5723a67f0301ca43e7b85dcf0e \\\n    --hash=sha256:93a943cfd3e33bd03f77b97baa11990148687877b74193bf777956b67054dcc6 \\\n    --hash=sha256:9be2f68fb9a40d8440cbf34cbf40758aa7f6093160bfc7fb018cce8e424f0c3a \\\n    --hash=sha256:a0c509894fd4dccdff557068e5074999ae3b75f4c5a2d6fb5415e782e25679c4 \\\n    --hash=sha256:ac8056e937f264995a82bf0053ca898a1cb1c9efc7cd68fa07fe0060734df7e4 \\\n    --hash=sha256:aed56a86daa43966dd790ba86d4b810b219f75b4bb737461b6886ce2bde38fd6 \\\n    --hash=sha256:e8986f1dd3221d1e741fda0a12eaa4a273f1d80a35e31a1ffe579e7c621d069e \\\n    --hash=sha256:f99212a81c62b5f22f9e7c3e347aa00491114a5647e1f13bbebd79c3e5f08d75\n    # via readme-renderer\npackaging==24.2 \\\n    --hash=sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759 \\\n    --hash=sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f\n    # via twine\npkginfo==1.12.0 \\\n    --hash=sha256:8ad91a0445a036782b9366ef8b8c2c50291f83a553478ba8580c73d3215700cf \\\n    --hash=sha256:dcd589c9be4da8973eceffa247733c144812759aa67eaf4bbf97016a02f39088\n    # via\n    #   -r requirements.in\n    #   twine\npycparser==2.21 \\\n    --hash=sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9 \\\n    --hash=sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206\n    # via cffi\npygments==2.16.1 \\\n    --hash=sha256:13fc09fa63bc8d8671a6d247e1eb303c4b343eaee81d861f3404db2935653692 \\\n    --hash=sha256:1daff0494820c69bc8941e407aa20f577374ee88364ee10a98fdbe0aece96e29\n    # via\n    #   readme-renderer\n    #   rich\nreadme-renderer==42.0 \\\n    --hash=sha256:13d039515c1f24de668e2c93f2e877b9dbe6c6c32328b90a40a49d8b2b85f36d \\\n    --hash=sha256:2d55489f83be4992fe4454939d1a051c33edbab778e82761d060c9fc6b308cd1\n    # via twine\nrequests==2.32.4 \\\n    --hash=sha256:27babd3cda2a6d50b30443204ee89830707d396671944c998b5975b031ac2b2c \\\n    --hash=sha256:27d0316682c8a29834d3264820024b62a36942083d52caf2f14c0591336d3422\n    # via\n    #   requests-toolbelt\n    #   twine\nrequests-toolbelt==1.0.0 \\\n    --hash=sha256:7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6 \\\n    --hash=sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06\n    # via twine\nrfc3986==2.0.0 \\\n    --hash=sha256:50b1502b60e289cb37883f3dfd34532b8873c7de9f49bb546641ce9cbd256ebd \\\n    --hash=sha256:97aacf9dbd4bfd829baad6e6309fa6573aaf1be3f6fa735c8ab05e46cecb261c\n    # via twine\nrich==13.5.2 \\\n    --hash=sha256:146a90b3b6b47cac4a73c12866a499e9817426423f57c5a66949c086191a8808 \\\n    --hash=sha256:fb9d6c0a0f643c99eed3875b5377a184132ba9be4d61516a55273d3554d75a39\n    # via twine\nsecretstorage==3.3.3 \\\n    --hash=sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77 \\\n    --hash=sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99\n    # via keyring\ntwine==6.0.1 \\\n    --hash=sha256:36158b09df5406e1c9c1fb8edb24fc2be387709443e7376689b938531582ee27 \\\n    --hash=sha256:9c6025b203b51521d53e200f4a08b116dee7500a38591668c6a6033117bdc218\n    # via -r requirements.in\nurllib3==2.6.3 \\\n    --hash=sha256:1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed \\\n    --hash=sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4\n    # via\n    #   requests\n    #   twine\nzipp==3.19.1 \\\n    --hash=sha256:2828e64edb5386ea6a52e7ba7cdb17bb30a73a858f5eb6eb93d8d36f5ea26091 \\\n    --hash=sha256:35427f6d5594f4acf82d25541438348c26736fa9b3afa2754bcd63cdb99d8e8f\n    # via importlib-metadata\n"
  },
  {
    "path": "tools/use-localhost.sh",
    "content": "# Source this file to run Kaggle Api V1 against http://localhost.\n\nif [[ \"$0\" == \"$BASH_SOURCE\" ]]; then\n  echo -e \"Source this file to run kaggle api cli against localhost:\\n\"\n  echo \"$ source use-localhost.sh\"\n  echo\n  exit 1\nfi\n\nexport KAGGLE_API_ENVIRONMENT=LOCALHOST\nexport KAGGLE_CONFIG_DIR=$(realpath \"${XDG_CONFIG_HOME:-$HOME/.config}/kaggle/dev\")\n\nKAGGLE_CONFIG_FILE=\"$KAGGLE_CONFIG_DIR/kaggle.json\"\nif ! [[ -f \"$KAGGLE_CONFIG_FILE\" ]]; then\n  # Generate a separate dev credentials file (kaggle.json) to use when running against\n  # http://localhost. This token only works when the webtier is running locally in debug\n  # mode. When running against localhost, we set KAGGLE_CONFIG_DIR env var to\n  # \"~/.config/kaggle/dev/\" so that the Python client searches for kaggle.json under this folder\n  # and uses dummy dev creds\n  \n  mkdir -p $KAGGLE_CONFIG_DIR\n  username=${KAGGLE_DEVELOPER:-$USER}\n  echo \"Creating a dev credentials file (kaggle.json)...\"\n  echo \"{\\\"username\\\":\\\"$username\\\",\\\"key\\\":\\\"local_api_token\\\"}\" > $KAGGLE_CONFIG_FILE\n  chmod 600 $KAGGLE_CONFIG_FILE\n  echo \"dev credentials created for username '$username'.\"\n  echo \"PLEASE VERIFY this matches your Kaggle username!\"\n  echo \"If not, update the $KAGGLE_CONFIG_DIR/kaggle.json file manually to set your Kaggle username. You will only need to do this once.\"\nfi\n"
  },
  {
    "path": "tools/use-prod.sh",
    "content": "# Source this file to run Kaggle Api V1 against https://www.kaggle.com.\n\nif [[ \"$0\" == \"$BASH_SOURCE\" ]]; then\n  echo -e \"Source this file to run kaggle api cli against prod:\\n\"\n  echo \"$ source use-prod.sh\"\n  echo\n  exit 1\nfi\n\nunset KAGGLE_API_ENVIRONMENT\nunset KAGGLE_CONFIG_DIR\n\nif ! [[ -f \"${XDG_CONFIG_HOME:-$HOME/.config}/kaggle/kaggle.json\" ]]; then\n  echo \"Warning: Please download an API token at https://www.kaggle.com/settings and\"\n  echo \"copy it to home directory to run the client against prod.\"\n  echo\nelse\n  chmod 600 \"${XDG_CONFIG_HOME:-$HOME/.config}/kaggle/kaggle.json\"\nfi"
  }
]