Skip to content

Conversation

@micahbf
Copy link
Contributor

@micahbf micahbf commented Jul 3, 2025

Add V2 Records API Client with Streaming Support

This PR introduces a new V2 Records API client that provides enhanced functionality for handling records with streaming capabilities.

Key Features

New V2 Records Client (src/v2/records/)

  • Streaming Support: Implements both streaming read and write operations for large datasets
  • Raw JSONL Interface: Direct access to JSONL formatted records for maximum performance

API Methods

Reading Records

  • getRaw() - Fetch raw JSONL records
  • getRawStreaming() - Stream raw JSONL records

Writing Records

  • writeRaw() - Write raw JSONL records
  • writeRawStreaming() - Stream write with chunking support

Integration

  • Added v2 property to existing Records client for seamless access
  • Comprehensive test coverage with 1000+ lines of tests
  • Fixture data for testing record conversion and streaming

Technical Implementation

  • Environment detection for streaming request body support
  • Fallback mechanisms for environments without streaming support
  • Proper error handling and logging
  • Type definitions for all new interfaces and methods

This enhancement provides developers with more efficient ways to handle large datasets while maintaining full compatibility with existing APIs.

@micahbf micahbf changed the title V1/V2 Records API Compatibility Improvements Add V2 Records API Jul 3, 2025
@micahbf micahbf merged commit 0652d8d into main Jul 9, 2025
2 checks passed
@micahbf micahbf deleted the mbf/v2-2 branch July 9, 2025 19:12
micahbf added a commit that referenced this pull request Jul 9, 2025
@micahbf micahbf mentioned this pull request Jul 9, 2025
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.

3 participants