Skip to content
Advertisement

What is the equivalent of connecting to google cloud storage(gcs) like in aws s3 using s3fs?

I want to access google cloud storage as in the code below.

JavaScript

Advertisement

Answer

You’re looking for gcsfs. Both s3fs and gcsfs are part of the fsspec project and have very similar APIs.

JavaScript

Note that both of these can be accessed from the fsspec interface, as long as you have the underlying drivers installed, e.g.:

JavaScript

fsspec is the file system handler underlying pandas and other libraries which parse cloud URLs. The reason the following “just works” is because fsspec is providing the cloud URI handling:

JavaScript
Advertisement