Skip to content

Offer progress indication #1830

Closed
Closed
@kofalt

Description

@kofalt

I might just be thick, but when searching through the web and documentation, I could not find a way to get gcloud to report upload / transfer progress to the callee:

# Sit blocked & mute for N minutes
bucket.blob(path).upload_from_filename(local_path)

One pattern I saw recently from docker-py allows you to set an optional stream parameter, in which case the function returns an iterator with json strings:

progress = docker_client.pull(repository=x, tag=y, stream=True)

for line in progress:
    update = json.loads(line)
    # do something with line - fields include current bytes, total bytes

A quick search indicates this could be related to #1077.

Metadata

Metadata

Labels

api: storageIssues related to the Cloud Storage API.priority: p2Moderately-important priority. Fix may not be included in next release.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