|
|
Stream, Parse, and Chat with Compressed Datasets Using LLMs
zipstream-ai is a Python package that lets you interact with .zip and .tar.gz files directly—no need to extract them manually. It integrates archive streaming, format detection, data parsing (e.g., CSV, JSON), and natural language querying with LLMs like Gemini, all through a unified interface.
Installation
Option 1: Install from PyPI (Recommended)
pip install zipstream-ai
Option 2: Install from Conda
# Install from conda
conda install -c pranav_motarwar zipstream-ai
# Install PyPI-only dependencies (required)
pip install openai typer python-dotenv google-generativeai
Note: The conda package includes core dependencies, but you'll need to install PyPI-only dependencies (openai, typer, python-dotenv, google-generativeai) separately via pip.
Features
| Feature | Description |
|---|---|
| Archive Streaming | Stream .zip and .tar.gz files without extraction |
| Format Auto-Detection | Automatically detects file types (CSV, JSON, TXT, etc.) |
| DataFrame Integration | Parses tabular data directly into pandas DataFrames |
| LLM Querying | Ask questions about your data using Gemini (Google's LLM) |
| Modular Design | Easily extensible for new formats or models |
| Python + CLI Support | Use via command line or as a Python package |
Use Case Examples
1. Load & Explore ZIP
from zipstream_ai import ZipStreamReader
reader = ZipStreamReader("dataset.zip")
print(reader.list_files())
2. Parse CSV from ZIP
from zipstream_ai import FileParser
parser = FileParser(reader)
df = parser.load("data.csv")
print(df.head())
3. Ask Questions with Gemini
from zipstream_ai import ask
response = ask(df, "Which 3 rows have the highest 'score'?")
print(response)
Why zipstream-ai?
| Traditional Workflow | With zipstream-ai |
|---|---|
| Manually unzip files | Stream directly from archive |
| Write boilerplate code to parse | Built-in file parsers (CSV, JSON, etc.) |
| Switch between tools for LLMs | One-liner ask(df, question) integration |
Architecture Diagram
┌──────────────┐
│ .zip/.tar │
└────┬─────────┘
│
┌──────────▼──────────┐
│ ZipStreamReader │
└──────────┬──────────┘
│
┌────────▼────────┐
│ FileParser │────> pd.DataFrame
└────────┬────────┘
│
┌────────▼────────┐
│ ask() │────> Gemini LLM Output
└─────────────────┘
Metadata
Release files for zipstream-ai 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zipstream_ai-1.0.1.tar.gz | 4.2 kB | Without provenance | Details for zipstream_ai-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zipstream_ai-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for zipstream_ai-1.0.1-py3-none-any.whl |
Total release size: 10.3 kB
Release files / zipstream_ai-1.0.1.tar.gz
| Download URL | zipstream_ai-1.0.1.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20f112fcad56191c54b13691fc677e5ebb06b926f6e4d687070c1c81a6428f20
|
|
BLAKE2b-256 checksum How to use checksums |
329ced0c1a7f8f5919847e4a18c77fa503a9834b33d0edefb78b0af8761eef17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Release files / zipstream_ai-1.0.1-py3-none-any.whl
| Download URL | zipstream_ai-1.0.1-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb32a776de30c27a350ae56c03d5a69bd04582cc149555524060922dd426f6d0
|
|
BLAKE2b-256 checksum How to use checksums |
4112dc98d075b84a1d052576a59c673fcff816b101a833c713c9a763eb65f3cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Security for zipstream-ai 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.