Azure / Azure/azure-sdk-for-python

Blob search using the glob(Unix style pathname pattern) syntax

Open
#40,269 4 comments 0 reactions 0 assignees View on GitHub
Client customer-reported feature-request needs-team-attention Service Attention Storage
Dominant language
Python
Stars
5.6k
Forks
3.4k
Avg merge
1d 21h
Merged PRs (30d)
193

Description

I would like to be able to efficiently list all the blobs in a container that match a Unix style pathname pattern.
as implemented in the python [glob module](https://docs.python.org/3/library/glob.html)

**Describe the solution you'd like**
I would like to be able to list blobs using for example
```
client.glob("dataset/sequence_*/image*_color.png")]
```
or
```
client.glob("dataset/**/image*_color.png", recursive=True)]
```

We could list all the blobs in `dataset` and do the filtering locally, but that is very slow when the number of blobs is large and we are interested in selecting only a small subset. Ideally this feature would be implemented on the server side to avoid having to retrieve large lists of files locally, but I guess this would be out of scope for the python SDK.
I implemented my own solution based on the glob python package but would like this feature to be part of the SDK instead.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.