Skip to content

Filehandle dev - #317

Merged
ofajardo merged 12 commits into
devfrom
filehandle_dev
Jan 23, 2026
Merged

Filehandle dev#317
ofajardo merged 12 commits into
devfrom
filehandle_dev

Conversation

@ofajardo

Copy link
Copy Markdown
Collaborator

No description provided.

ofajardo and others added 12 commits August 15, 2025 19:07
- Add custom I/O handlers in _readstat_parser.pyx to bridge Python file objects to ReadStat C library
- Modify run_conversion() to detect file-like objects and use custom handlers
- Works for all read functions (SAV, SAS7BDAT, DTA, XPORT, POR)
- Add test in test_basic.py and test_narwhalified.py (pandas/polars compatible)
- Add README documentation with zip archive example

Addresses maintainer feedback:
- Uses run_conversion() directly instead of separate wrapper
- Preserves apply_value_formats and all other options
- File handle support works for all formats, not just SAV
Test demonstrates reading SAV files from remote sources via HTTP, showing real-world usage of file handle support. Uses built-in http.server - no external dependencies needed.
…andles

[Issue-308]: Add support for reading directly from file handles
…ing temporary directory for file handle for zip file
@ofajardo
ofajardo merged commit 9c84875 into dev Jan 23, 2026
@ofajardo
ofajardo deleted the filehandle_dev branch January 23, 2026 18:01
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.

2 participants