GCSFS

2026.3.0 · active · verified Sat Mar 28

GCSFS provides a Pythonic file-system interface to Google Cloud Storage, allowing seamless interaction with GCS as if it were a local file system. The current version is 2026.3.0, and it follows a regular release cadence with updates approximately every few months.

Warnings

Install

Imports

Quickstart

This script demonstrates how to initialize a GCSFileSystem instance, list files in a GCS bucket, and read a file from GCS.

import gcsfs

# Initialize the GCSFileSystem
fs = gcsfs.GCSFileSystem(project='your-project-id')

# List files in a bucket
print(fs.ls('your-bucket-name'))

# Read a file
with fs.open('your-bucket-name/your-file.txt', 'rb') as f:
    print(f.read())

view raw JSON →