Skip to content

feat(cli): flatten nested fields in table and CSV output#7

Closed
slai11 wants to merge 3 commits intomainfrom
feat/flatten-nested-output
Closed

feat(cli): flatten nested fields in table and CSV output#7
slai11 wants to merge 3 commits intomainfrom
feat/flatten-nested-output

Conversation

@slai11
Copy link

@slai11 slai11 commented Mar 18, 2026

Summary

  • Flatten nested dicts into dot-notation columns (e.g. info.symbol, attributes.volume_usd_1d) for both table and CSV output
  • Serialize list values as JSON strings instead of Python repr
  • CSV nested values use json.dumps() (double quotes, JSON bools/null) instead of Python str() (single quotes, True/None)

Test plan

  • uv run pytest tests/test_output.py -v — 7 tests pass
  • uv run ruff check . && uv run ruff format --check . — clean
  • Manual: allium realtime tokens list --format table shows flattened columns
  • Manual: allium realtime tokens list --format csv has no single-quote Python dicts

🤖 Generated with Claude Code

slai11 and others added 2 commits March 18, 2026 02:59
Nested dicts are promoted to dot-notation columns (e.g. info.symbol).
Lists are serialized as JSON strings. CSV values for any remaining nested
types use json.dumps instead of Python repr (single quotes).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@slai11 slai11 closed this Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant