Skip to content

Storage API too complex to extract file path #2034

Description

@VelizarVESSELINOV

Datalab API examples: https://github.com/googledatalab/datalab/blob/f52335fe7bc596aa63f61230717c473caf6047de/dev/notebooks/Cloud%20Storage%20-%20Reading%20and%20Writing%20Files.ipynb

items = shared_bucket.items()
keys = map(lambda item: item.key, items)
keys

What it is the equivalent in gcloud-python?

items = shared_bucket.list_blobs()
keys = ['/'.join(item.id.split('/')[1:-1]) for item in items]

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

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions