Skip to content

Codex [ FastAPI ] Add StreamingCSVResponse for large exports#1160

Closed
cerredz wants to merge 1 commit into
UnsafeLabs:mainfrom
cerredz:fix/799-streaming-csv-response
Closed

Codex [ FastAPI ] Add StreamingCSVResponse for large exports#1160
cerredz wants to merge 1 commit into
UnsafeLabs:mainfrom
cerredz:fix/799-streaming-csv-response

Conversation

@cerredz
Copy link
Copy Markdown

@cerredz cerredz commented May 16, 2026

/claim #799

Summary

  • Adds StreamingCSVResponse for streaming CSV rows from async or sync iterables.
  • Emits text/csv with an attachment Content-Disposition filename.
  • Supports ordered CSV column headers, RFC4180 escaping via Python's csv writer, and custom single-character delimiters.
  • Adds tests for header output, streaming async generators, sync iterables, escaping, custom delimiters, and delimiter validation.

Validation

  • uv run python -m pytest tests/test_streaming_csv_response.py -q
  • uv run ruff check fastapi/responses.py tests/test_streaming_csv_response.py
  • uv run ruff format --check fastapi/responses.py tests/test_streaming_csv_response.py
  • uv run python -m compileall -q fastapi/responses.py tests/test_streaming_csv_response.py
  • git diff --check HEAD~1..HEAD

Note: I did not add contributor_meta.json because it asks for prompt/runtime/session provenance rather than product code or tests.

@github-actions
Copy link
Copy Markdown
Contributor

Unfortunately the changes in this PR didn't fully resolve the issue. Please rework your solution and submit a new pull request.

Make sure to review the acceptance criteria in the linked issue and verify all conditions are met before resubmitting. See CONTRIBUTING.md for guidelines.

@github-actions github-actions Bot closed this May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant