Lines Matching refs:key
24 def __init__(self, key, secret, bucket_name):
25 """Initializes the bucket with a key, secret, and bucket_name.
28 key: the API key to access GS.
33 conn = uri.connect(key, secret)
37 key = boto.gs.key.Key(self.bucket)
38 key.key = path
39 return key
43 key = self._GetKey(path)
44 key.set_metadata('Content-Type', content_type)
45 key.set_contents_from_string(contents)
47 key.add_email_grant('FULL_CONTROL',
52 key = self._GetKey(path)
53 if key.exists():
54 return key.get_contents_as_string()
60 key = self._GetKey(path)
61 if key.exists():
62 key.set_contents_from_string(contents)
68 key = self._GetKey(path)
69 key.delete()
73 key = self._GetKey(path)
74 return key.exists()
78 key = self._GetKey(path)
79 if key.exists():
82 return key.generate_url(3600).replace('AWSAccessKeyId', 'GoogleAccessId')
88 return (key.key for key in self.bucket.get_all_keys(prefix=prefix))