# piskvorky/smart_open

Utils for streaming large files (S3, HDFS, gzip, bz2...)

Repository: https://github.com/piskvorky/smart_open
Canonical: https://ross.abutalabs.com/products/smart_open
Language: Python
License: MIT
License Family: permissive
Topics: python, s3, hdfs, webhdfs, boto, streaming, file, streaming-data, gzip-stream, bz2, hacktoberfest
Last push: 2026-08-04T08:34:12+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 96, release rhythm 93, longevity 100
- inputs: {"age_days": 4261, "days_push": 29, "days_rel": 49, "gap_med": 21.0, "n_releases_24m": 19}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3457, forks 390 (observed 2026-08-28T04:08:05.530718+00:00)

## What it is
A Python library for efficiently streaming very large files to and from remote storages like S3, GCS, Azure Blob Storage, HDFS, WebHDFS, HTTP, and SFTP, with transparent on-the-fly compression/decompression. It is a drop-in replacement for Python's built-in open() with a unified Pythonic API.

## Use cases
- stream large files from s3 in python
- read gzip files line by line without extracting
- replace boto3 upload_fileobj boilerplate
- write files to hdfs or webhdfs from python
- stream data over http or sftp like a local file
- convert between compressed file formats on the fly
- process huge remote datasets without downloading them fully

## When to choose
- you need a unified open()-like API across S3, GCS, Azure, HDFS, HTTP, and SFTP
- you want transparent gzip/bz2/zstd compression while streaming
- you're tired of boto3 file-like object boilerplate for large files

## When to avoid
- you only work with local files and don't need remote storage or compression
- you need fine-grained control over multipart upload tuning that boto3 exposes directly
- you need a non-Python solution

## Facets
- artifact type: library
- maturity: stable
- function: file-system, compression, http-client, streaming, etl
- domain: files, cloud-computing, developer-tools
- platform: python, cross-platform
- tags: s3, gcs, azure-blob, hdfs, sftp, gzip, bzip2, zstd, drop-in-open-replacement, remote-storage, data-engineering

## Member repositories
- piskvorky/smart_open (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:05.530718+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:37:29.491074+00:00, confidence not recorded.
  - readme: https://github.com/piskvorky/smart_open (fetched 2026-08-28T04:08:05.530718+00:00, sha 902d462a5909)
  - registry_pypi: https://pypi.org/pypi/smart_open/json (fetched 2026-08-29T09:31:08.634533+00:00, sha e01d5f1d3417)
- Data as of 2026-08-30T08:39:29.467469+00:00.
