Skip to content

Add create_signed_upload_urls() helper to the Python Storage client #1559

Description

@NafeesMadni

Description

The Python Storage client currently provides create_signed_upload_url(path) for generating a signed upload URL for a single object, but it does not provide a create_signed_upload_urls(paths) helper for multiple objects.

This makes the API inconsistent with the download API, which supports both create_signed_url() and create_signed_urls().

When an application needs to upload multiple files using signed upload URLs, developers must manually iterate over each path and invoke create_signed_upload_url() repeatedly. This adds unnecessary boilerplate and makes batch uploads less ergonomic.

Use cases:

  • Uploading multiple images selected by a user.
  • Uploading document batches.
  • Drag-and-drop uploads of multiple files.
  • Any workflow where signed upload URLs are generated before uploading several objects.

Providing a batch helper would make the Storage client more consistent and improve the developer experience.

Suggested solution

Provide a create_signed_upload_urls(paths) method in the Python Storage client.

If the Storage API exposes (or will expose) a batch endpoint, the SDK can use it directly.

Otherwise, the SDK could implement this as a convenience helper by internally calling create_signed_upload_url() for each path (optionally concurrently) and returning a list of results. This would reduce boilerplate while remaining fully backward compatible.

Example:

responses = storage.create_signed_upload_urls([
    "images/a.jpg",
    "images/b.jpg",
    "images/c.jpg",
])

for response in responses:
    print(response)

This would align the upload API with the existing create_signed_urls() method for downloads and provide a more consistent developer experience.

Alternatives

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestpythonPull requests that update Python codestorageIssues related to storage-py

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions