Connect Google Cloud Storage

Use the GCS JSON API endpoint and anonymous credentials for an open local instance.

Connection settings

JSON API endpoint
http://localhost:9000
Credentials
Anonymous when Sqrzl authentication is disabled.

The default Compose configuration enables authentication. To use this example, disable it as described in Configuration.

Python example

from google.auth.credentials import AnonymousCredentials
from google.cloud import storage

gcs = storage.Client(
    project="sqrzl",
    credentials=AnonymousCredentials(),
    client_options={"api_endpoint": "http://localhost:9000"},
)
bucket = gcs.bucket("example-bucket")
bucket.create()
bucket.blob("hello.txt").upload_from_string("hello")

XML API

Raw XML API requests use http://localhost:9000/<bucket>/<object> and send Host: storage.googleapis.com. For signed requests, configure the GCS HMAC access ID and secret.

See the compatibility matrix for the supported JSON and XML operations.