Skip to content

Add encryption_key param to Blob.from_string #390

@harrydrippin

Description

@harrydrippin

Is your feature request related to a problem? Please describe.
When I need to generate Blob object by using factory function Blob.from_string, I cannot use customer-supplied encryption option smoothly. I always need to assign internal variables like below:

blob = Blob.from_string("gs://somewhere/sample.txt", client=client)
blob._encryption_key = encryption_key

Describe the solution you'd like

  • Add encryption_key parameter to Blob.from_string.

Describe alternatives you've considered
Maybe adding explicit setter for _encryption_key is possible, but I think the solution above is more effective for resolving this issue.

Additional context
I have a draft PR for this fix, so please review it if this request is acceptable. Thanks!

Metadata

Metadata

Labels

api: storageIssues related to the googleapis/python-storage API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions