Guest User

Untitled

a guest
Dec 12th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. cloud_storage_bucket = 'pubsite_prod_rev_100311***********'
  2.  
  3. report_to_download = 'acquisition/buyers_7d/buyers_7d_com.game.**********_channel.csv'
  4.  
  5.  
  6. private_key = json.loads(open(json_file).read())['private_key']
  7.  
  8. credentials = ServiceAccountCredentials.from_json_keyfile_name(json_file,'https://www.googleapis.com/auth/devstorage.read_only')
  9.  
  10. storage = build('storage', 'v1', credentials =credentials)
  11.  
  12. a = storage.objects().get(bucket=cloud_storage_bucket,object=report_to_download).execute()
  13.  
  14. kind
  15. id
  16. selfLink
  17. name
  18. bucket
  19. generation
  20. metageneration
  21. contentType
  22. timeCreated
  23. updated
  24. storageClass
  25. timeStorageClassUpdated
  26. size
  27. md5Hash
  28. mediaLink
  29. contentEncoding
  30. crc32c
  31. etag
Add Comment
Please, Sign In to add comment