Python 连接 ceph rgw 示例
作者:
ZhiXiong | 来源:发表于
2020-05-17 10:13 被阅读0次import boto3
def main():
access_key = "access_key"
secret_key = "secret_key"
s3_host = "http://host:7480"
s3client = boto3.client('s3',
aws_secret_access_key=secret_key,
aws_access_key_id=access_key,
endpoint_url=s3_host
)
bucket_name = "bucket_name"
s3client.download_file(Filename="write_to_file", Bucket=bucket_name, Key="test.png")
if __name__ == '__main__':
main()
本文标题:Python 连接 ceph rgw 示例
本文链接:https://www.haomeiwen.com/subject/hwdightx.html
网友评论