Package Classes (3.0.0rc1)

Summary of entries of Classes for storage.

Classes

ACL

Container class representing a list of access controls.

BucketACL

An ACL specifically for a bucket.

DefaultObjectACL

A class representing the default object ACL for a bucket.

ObjectACL

An ACL specifically for a Cloud Storage object / blob.

Batch

Proxy an underlying connection, batching up change operations.

MIMEApplicationHTTP

MIME type for application/http.

Constructs payload from headers and body

Blob

A wrapper around Cloud Storage's concept of an Object.

Retention

Map an object's retention configuration.

Bucket

A class representing a Bucket on Cloud Storage.

IAMConfiguration

Map a bucket's IAM configuration.

LifecycleRuleAbortIncompleteMultipartUpload

Map a rule aborting incomplete multipart uploads of matching items.

The "age" lifecycle condition is the only supported condition for this rule.

LifecycleRuleConditions

Map a single lifecycle rule for a bucket.

See: https://cloud.google.com/storage/docs/lifecycle

LifecycleRuleDelete

Map a lifecycle rule deleting matching items.

LifecycleRuleSetStorageClass

Map a lifecycle rule updating storage class of matching items.

SoftDeletePolicy

Map a bucket's soft delete policy.

See https://cloud.google.com/storage/docs/soft-delete

Client

Client to bundle configuration needed for API requests.

DataCorruption

Error class for corrupt media transfers.

InvalidResponse

Error class for responses which are not in the correct state.

BlobReader

A file-like object that reads from a blob.

BlobWriter

A file-like object that writes to a blob.

SlidingBuffer

A non-rewindable buffer that frees memory of chunks already consumed.

This class is necessary because google-resumable-media-python expects tell() to work relative to the start of the file, not relative to a place in an intermediate buffer. Using this class, we present an external interface with consistent seek and tell behavior without having to actually store bytes already sent.

Behavior of this class differs from an ordinary BytesIO buffer. write() will always append to the end of the file only and not change the seek position otherwise. flush() will delete all data already read (data to the left of the seek position). tell() will report the seek position of the buffer including all deleted data. Additionally the class implements len() which will report the size of the actual underlying buffer.

This class does not attempt to implement the entire Python I/O interface.

HMACKeyMetadata

Metadata about an HMAC service account key withn Cloud Storage.

BucketNotification

Represent a single notification resource for a bucket.

See: https://cloud.google.com/storage/docs/json_api/v1/notifications

ConditionalRetryPolicy

A class for use when an API call is only conditionally safe to retry.

This class is intended for use in inspecting the API call parameters of an API call to verify that any flags necessary to make the API call idempotent (such as specifying an if_generation_match or related flag) are present.

It can be used in place of a retry.Retry object, in which case _http.Connection.api_request will pass the requested api call keyword arguments into the conditional_predicate and return the retry_policy if the conditions are met.

Modules

acl

Manage access to objects and buckets.

batch

Batch updates / deletes of storage buckets / blobs.

A batch request is a single standard HTTP request containing multiple Cloud Storage JSON API calls. Within this main HTTP request, there are multiple parts which each contain a nested HTTP request. The body of each part is itself a complete HTTP request, with its own verb, URL, headers, and body.

Note that Cloud Storage does not support batch operations for uploading or downloading. Additionally, the current batch design does not support library methods whose return values depend on the response payload. See more details in the Sending Batch Requests official guide.

Examples of situations when you might want to use the Batch module: blob.patch() blob.update() blob.delete() bucket.delete_blob() bucket.patch() bucket.update()

blob

Create / interact with Google Cloud Storage blobs.

bucket

Create / interact with Google Cloud Storage buckets.

client

Client for interacting with the Google Cloud Storage API.

constants

Constants used across google.cloud.storage modules.

See Python Storage Client Constants Page for constants used across storage classes, location types, public access prevention, etc.

exceptions

Exceptions raised by the library.

fileio

Module for file-like access of blobs, usually invoked via Blob.open().

hmac_key

Configure HMAC keys that can be used to authenticate requests to Google Cloud Storage.

See HMAC keys documentation

notification

Configure bucket notification resources to interact with Google Cloud Pub/Sub.

See Cloud Pub/Sub Notifications for Google Cloud Storage

retry

Helpers for configuring retries with exponential back-off.

See Retry Strategy for Google Cloud Storage

transfer_manager

Concurrent media operations.