smart_open is a Python library for streaming very large files from local or remote storage through a familiar file-like interface. It acts as an extended replacement for Python's built-in open function. Supported backends include Amazon S3, Google Cloud Storage, Azure Blob Storage, HDFS, WebHDFS, HTTP, HTTPS, SFTP, and local filesystems. Data can be read or written without first downloading an entire remote object to disk. Transparent compression and decompression are supported for multiple common formats. Standard operations such as context managers, iteration, and supported seek behavior remain available. Optional transport dependencies let installations include only the cloud or protocol integrations an application actually requires.
Features
- Streaming access to very large files
- S3, GCS, Azure, HDFS, and HTTP support
- SSH, SCP, and SFTP file access
- Transparent compression and decompression
- Python open-compatible interface
- Optional transport-specific dependencies