繁体   English   中英

django boto amazon s3中的键上有哪些可用属性

[英]what attributes are available on key in django boto amazon s3

我正在使用boto从亚马逊获取钥匙清单。 我使用key.name来获取密钥的名称

我想知道键上还有哪些其他属性

在亚马逊上是否提到了可用于任何密钥的信息

查阅boto参考文档: boto API参考

您还可以使用内置的dir()函数获取对象的属性列表,当从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']

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM