Module blob (3.3.1)

Create / interact with Google Cloud Storage blobs.

Classes

Blob

  Blob 
 ( 
 name 
 , 
 bucket 
 , 
 chunk_size 
 = 
 None 
 , 
 encryption_key 
 = 
 None 
 , 
 kms_key_name 
 = 
 None 
 , 
 generation 
 = 
 None 
 , 
 crc32c_checksum 
 = 
 None 
 , 
 ) 
 

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

Parameters
Name
Description
name
str

The name of the blob. This corresponds to the unique path of the object in the bucket. If bytes, will be converted to a unicode object. Blob / object names can contain any sequence of valid unicode characters, of length 1-1024 bytes when UTF-8 encoded.

bucket
Bucket

The bucket to which this blob belongs.

chunk_size
int

(Optional) The size of a chunk of data whenever iterating (in bytes). This must be a multiple of 256 KB per the API specification. If not specified, the chunk_size of the blob itself is used. If that is not specified, a default value of 40 MB is used.

encryption_key
bytes

(Optional) 32 byte encryption key for customer-supplied encryption. See https://cloud.google.com/storage/docs/encryption#customer-supplied .

kms_key_name
str

(Optional) Resource name of Cloud KMS key used to encrypt the blob's contents.

generation
long

(Optional) If present, selects a specific revision of this object.

crc32c_checksum
str

(Optional) If set, the CRC32C checksum of the blob's content. CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. See Apenndix B: https://datatracker.ietf.org/doc/html/rfc4960#appendix-B base64: https://datatracker.ietf.org/doc/html/rfc4648#section-4

Retention

  Retention 
 ( 
 blob 
 , 
 mode 
 = 
 None 
 , 
 retain_until_time 
 = 
 None 
 , 
 retention_expiration_time 
 = 
 None 
 ) 
 

Map an object's retention configuration.

Create a Mobile Website
View Site in Mobile | Classic
Share by: