[Answered ]-What attributes are available on key in django boto amazon s3

2👍

Check out the boto reference documentation: boto API reference

You can also fetch a list of object’s attributes with built-in dir() function, very convenient for quick attribute search when working with an unfamiliar library from Python CLI:

>>> import boto.s3.key
>>> k = boto.s3.key.Key('somebucket')
>>> dir(k)
['BufferSize', 'DefaultContentType', '__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattr__', '__getattribute__', '__hash__', '__init__', '__iter__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'add_email_grant', 'add_user_grant', 'base64md5', 'bucket', 'cache_control', 'change_storage_class', 'close', 'closed', 'compute_md5', 'content_disposition', 'content_encoding', 'content_language', 'content_type', 'copy', 'delete', 'delete_marker', 'encrypted', 'endElement', 'etag', 'exists', 'filename', 'generate_url', 'get_acl', 'get_contents_as_string', 'get_contents_to_file', 'get_contents_to_filename', 'get_file', 'get_md5_from_hexdigest', 'get_metadata', 'get_torrent_file', 'get_xml_acl', 'handle_encryption_headers', 'handle_version_headers', 'is_latest', 'last_modified', 'make_public', 'md5', 'metadata', 'mode', 'name', 'next', 'open', 'open_read', 'open_write', 'owner', 'path', 'provider', 'read', 'resp', 'send_file', 'set_acl', 'set_canned_acl', 'set_contents_from_file', 'set_contents_from_filename', 'set_contents_from_stream', 'set_contents_from_string', 'set_metadata', 'set_xml_acl', 'size', 'source_version_id', 'startElement', 'storage_class', 'update_metadata', 'version_id']
👤vvd

Leave a comment