python - How can I add a tag to a key in boto (Amazon S3)? -


i trying tag key i've uploaded s3. in same below create file string. once have key, i'm not sure how tag file. i've tried tag tagset.

from boto.s3.bucket import bucket boto.s3.key import key boto.s3.tagging import tag, tagset  k = key(bucket) k.key = 'foobar/somefilename' k.set_contents_from_string('some data in file')  tag(k, 'the_tag') 

as far can see in docs, settags-method available on bucket level , not on individual keys. therefore cannot set different tags uploaded file, have on containing bucket.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -