Skip to content

Keep datasets files JSON output parseable - #1187

Closed
ternaus wants to merge 1 commit into
Kaggle:mainfrom
ternaus:codex/datasets-files-json-pagination
Closed

ternaus wants to merge 1 commit into
Kaggle:mainfrom
ternaus:codex/datasets-files-json-pagination

Conversation

@ternaus

@ternaus ternaus commented Aug 29, 2026

Copy link
Copy Markdown

Fixes #1186.

kaggle datasets files --format json printed the pagination token to stdout before the JSON array. The command now sends that token to stderr when an explicit output format is requested, while keeping the table/CSV stdout behavior unchanged.

Tests:

  • uv run --with pytest pytest tests/unit/test_cli_datasets.py tests/unit/test_dataset_files.py
  • uv run --with black black --check --diff src/kaggle/api/kaggle_api_extended.py tests/unit/test_dataset_files.py

@sridipbasu sridipbasu added the bug Something isn't working label Sep 1, 2026
@stevemessick

Copy link
Copy Markdown
Contributor

/gcbrun

@stevemessick

Copy link
Copy Markdown
Contributor

Thanks for the contribution! However, this change breaks backward compatibility, so we will not be merging it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

datasets files --format json prefixes stdout with pagination text

3 participants