Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Add encryption_key param to Blob.from_string #390

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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