New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce a collections/filtering mechanism for CloudBridge #91

Open
nuwang opened this Issue Sep 30, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@nuwang
Contributor

nuwang commented Sep 30, 2017

It would be nice to support a Django like query syntax for searching and filtering objects, which is something that Boto3 also supports.

For example, in Boto3, it's possible to filter a collection as follows:

bucket.objects.filter(Prefix='photos/'):

These collection filters can also be chained:

bucket.objects.filter(Prefix='photos/').limit(10).page_size(5):

You can also perform batch actions, for example:

s3.Bucket('my-bucket').objects.delete()

Which would delete all objects within the bucket. As with Django, the filters are lazily evaluated.

Reference:
https://boto3.readthedocs.io/en/latest/guide/collections.html
https://docs.djangoproject.com/en/1.11/ref/models/querysets/

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