Instantly share code, notes, and snippets.

Embed
What would you like to do?
{
"Contents": [
{
"LastModified": "2018-06-15T20:40:28.000Z",
"ETag": "\"80f71457cb2f2aae8d\"",
"StorageClass": "STANDARD",
"Key": "000097-20030605.pdf",
"Owner": {
"DisplayName": "bpr-admin",
"ID": "6822198f40e279e66289724108f3a791719ef9422f72611ca45b0ad7cd5e9d12"
},
"Size": 15646
},
{
"LastModified": "2018-06-15T20:40:28.000Z",
"ETag": "\"dafa3ed3e751f2de9\"",
"StorageClass": "STANDARD",
"Key": "000097-20040317.pdf",
"Owner": {
"DisplayName": "bpr-admin",
"ID": "6822198f40e279e66289724108f3a791719ef9422f72611ca45b0ad7cd5e9d12"
},
"Size": 16134
},
{
"LastModified": "2018-06-15T20:40:28.000Z",
"ETag": "\"1168fc23b012f7e0e00cfa57fa725cd0\"",
"StorageClass": "STANDARD",
"Key": "000221-19910522-0-a.pdf",
"Owner": {
"DisplayName": "bpr-admin",
"ID": "6822198f40e279e66289724108f3a791719ef9422f72611ca45b0ad7cd5e9d12"
},
"Size": 22933
}, ...
-------------------------------------------------------
with open('objects.json') as f:
objects = json.load(f)
for object in objects:
print('file:', object['Contents']['Key'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment