Skip to main content

gcsfs

|Build Status| |Docs|

GCSFS is a Python library that provides a familiar, file-system-like interface to Google Cloud Storage (GCS). Built on top of fsspec, it allows you to interact with cloud buckets as if they were local directories, making it a favorite for data scientists and engineers.


Getting Started

Installation

Install via pip or conda:

# Using pip
pip install gcsfs

# OR using conda
conda install -c conda-forge gcsfs

Basic Usage

import gcsfs

# Initialize the filesystem
fs = gcsfs.GCSFileSystem(project='my-google-project')

# List files in a bucket
files = fs.ls('my-bucket')

# Read a file directly into a string/bytes
with fs.open('my-bucket/data.txt', 'rb') as f:
    content = f.read()

Specialized Bucket Support

GCSFS now automatically supports advanced Google Cloud Storage features through its ExtendedFileSystem implementation.

1. Hierarchical Namespace (HNS)

Hierarchical Namespace (HNS) replaces the traditional "flat" GCS structure with true logical directories.

  • Atomic Renames: Moving or renaming a directory is an O(1) metadata operation. No more slow "copy-then-delete" for large folders.
  • High Performance: Offers up to 8x higher initial Queries Per Second (QPS) for read/write operations.
  • AI/ML Ready: Ideal for heavy checkpointing and managing millions of small files.

2. Rapid Buckets (Zonal Storage)

Rapid Buckets are zonal storage resources designed for ultra-low latency and maximum throughput.

  • Zonal Co-location: Place your data in the same zone as your GPU/TPU clusters to minimize network lag.
  • True Appends: Unlike standard GCS objects, you can append data to existing objects in Rapid buckets without a full rewrite.
  • Streaming I/O: Optimized for high-speed model loading and real-time logging.

Integration & Auth

GCSFS plays nicely with the rest of the Python data ecosystem.

Authentication Modes

  • Default: Uses your local gcloud credentials or environment service accounts.
  • Cloud: Explicitly use Google Metadata service (token='cloud').
  • Anonymous: Access public data without a login (token='anon').
  • Service Account: Pass the path to your JSON key file (token='path/to/key.json').

[!TIP] Note on Async: GCSFS is built on aiohttp. If you are building high-concurrency applications, you can use the asynchronous API by passing asynchronous=True to the GCSFileSystem constructor.


Support

Work on this repository is supported in part by:

"Anaconda, Inc. - Advancing AI through open source."

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gcsfs-2026.8.1.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gcsfs-2026.8.1-py3-none-any.whl (91.4 kB view details)

Uploaded Python 3

File details

Details for the file gcsfs-2026.8.1.tar.gz.

File metadata

  • Download URL: gcsfs-2026.8.1.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for gcsfs-2026.8.1.tar.gz
Algorithm Hash digest
SHA256 738da7dcc74817c7668d032f932598482a23cce1b061c537e54278be44d2fff8
MD5 e46332b5ad6430280baed9dfb42f39b9
BLAKE2b-256 d008cb32ace6483b8016e8954f009f133799d299dc1bb35b310ced04bd46a925

See more details on using hashes here.

Provenance

The following attestation bundles were made for gcsfs-2026.8.1.tar.gz:

Publisher: release.yml on fsspec/gcsfs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gcsfs-2026.8.1-py3-none-any.whl.

File metadata

  • Download URL: gcsfs-2026.8.1-py3-none-any.whl
  • Upload date:
  • Size: 91.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for gcsfs-2026.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 66e6316690b17e1887a4f4bc0902eee53f5b3fd860cc3f0377d65c5be3313b1f
MD5 4dca2f674d9fc05091435ca74d14fa7a
BLAKE2b-256 04e11db9ecfb9f22a71624413ee158b933c18538aacfde77acbb7413cea21a6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for gcsfs-2026.8.1-py3-none-any.whl:

Publisher: release.yml on fsspec/gcsfs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2026.8.1 This release

2 files

2026.8.0

2 files

2026.7.0

2 files

2026.6.0

2 files

2026.5.0

2 files

2026.4.0

2 files

2026.3.0

2 files

2026.2.0

2 files

2026.1.0

2 files

2025.12.0

2 files

2025.10.0

2 files

2025.9.0

2 files

2025.7.0

2 files

2025.5.1

2 files

2025.5.0.post1

2 files

2025.5.0

2 files

2025.3.2

2 files

2025.3.1

2 files

2025.3.0

2 files

2025.2.0

2 files

2024.12.0

2 files

2024.10.0

2 files

2024.9.0

2 files

2024.6.1

2 files

2024.6.0

2 files

2024.5.0

2 files

2024.3.1

2 files

2024.2.0

2 files

2023.12.1

2 files

2023.12.0

2 files

2023.10.0

2 files

2023.9.2

2 files

2023.9.1

2 files

2023.9.0

2 files

2023.6.0

2 files

2023.5.0

2 files

2023.4.0

2 files

2023.3.0

2 files

2023.1.0

2 files

2022.11.0

2 files

2022.10.0

2 files

2022.8.2

2 files

2022.8.1

2 files

2022.7.1

2 files

2022.5.0

2 files

2022.3.0

2 files

2022.2.0

2 files

2022.1.0

2 files

2021.11.1

2 files

2021.11.0

2 files

2021.10.1

2 files

2021.10.0

2 files

2021.9.0

2 files

2021.8.1

2 files

2021.7.0

2 files

2021.6.1

2 files

2021.6.0

2 files

2021.5.0

2 files

2021.4.0

2 files

0.8.0

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.3.1

1 file

0.3.0

2 files

0.2.3

1 file

0.2.2

1 file

0.2.1

1 file

0.2.0

1 file

0.1.2

1 file

0.1.1

1 file

0.1.0

1 file

0.0.6

1 file

0.0.5

1 file

0.0.4

2 files

0.0.3

2 files

0.0.2

1 file

0.0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page