cloudbridge
cloudbridge copied to clipboard
Introduce a collections/filtering mechanism for CloudBridge
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/