Memory-efficient streaming XLSX to CSV converter for any data source.
Project description
xlsx-streamer
xlsx-streamer is a memory-efficient Python library and CLI tool for streaming large XLSX files to CSV format from any data source. It supports reading from local files, AWS S3, and HTTP/HTTPS URLs without loading entire files into memory.
Features
- Multi-source support: Read XLSX files from local filesystem, AWS S3, and HTTP/HTTPS URLs
- Memory-efficient streaming: Process large files without loading them entirely into memory
- Simple unified API: Single
XLSXReaderclass works with all source types - Flexible output: Stream rows as Python lists or convert directly to CSV files
- Type hints: Fully typed for better IDE support and type checking
- CLI tool: Command-line interface with source auto-detection
Quick Start
Python API
from xlsx_streamer import XLSXReader
# Auto-detect source type
reader = XLSXReader("s3://bucket/file.xlsx", sheet_name="Sheet1") # S3
reader = XLSXReader("https://example.com/file.xlsx") # HTTP
reader = XLSXReader("/path/to/file.xlsx") # Local file
# Stream rows
for row in reader.stream_rows():
print(row)
# Convert to CSV
reader.to_csv("output.csv")
CLI
# Local file
xlsx-streamer input.xlsx > output.csv
# From S3
xlsx-streamer s3://bucket/path/file.xlsx > output.csv
# From HTTP
xlsx-streamer https://example.com/file.xlsx > output.csv
# Save to file
xlsx-streamer input.xlsx --output output.csv
# Specify sheet
xlsx-streamer input.xlsx --sheet "Sheet2" > output.csv
# Enable verbose logging
xlsx-streamer input.xlsx --verbose
Installation
Install the base package with support for local files:
pip install xlsx-streamer
Add optional support for S3:
pip install xlsx-streamer[s3]
Add optional support for HTTP:
pip install xlsx-streamer[http]
Install all optional dependencies:
pip install xlsx-streamer[all]
Documentation
- Developer Guide - Setup, testing, and deployment
- Architecture & Development - Technical guidelines for contributors
- Project Roadmap - Future plans and feature pipeline
Acknowledgments
This project builds on the excellent work of:
- stream-unzip - Memory-efficient ZIP streaming library
- typer-slim - Simplified CLI framework
- boto3 - AWS SDK for Python
- httpx - Modern HTTP client
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xlsx_streamer-0.1.0.tar.gz.
File metadata
- Download URL: xlsx_streamer-0.1.0.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ae7894deaa880fef800daefd0c99e81bf10a9dbbb0a3154b1ed8db21f5aea40
|
|
| MD5 |
6b783ea6203b0be915a8a365688857d3
|
|
| BLAKE2b-256 |
50089af09b490374973e7ec19fd4449d8880ce6a41c0bb9327734944e0abe59b
|
File details
Details for the file xlsx_streamer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: xlsx_streamer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1164a7665e29e5a2879b500af64c2897062ec062a2c77200a852f4563f750d87
|
|
| MD5 |
e30be8308a372b297c3ae8031eb3b130
|
|
| BLAKE2b-256 |
6b0b06906e3ff5f65b39dd97df768bc79c1dc5961cedfd489e891fb68e1ad76e
|