Explorar o código

Simple connection with boto3 on local bucket

DricomDragon %!s(int64=4) %!d(string=hai) anos
pai
achega
885920dddc
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      boto-updater.py

+ 8 - 0
boto-updater.py

@@ -0,0 +1,8 @@
+import boto3
+
+# Main
+s3 = boto3.resource('s3', use_ssl=False, endpoint_url="http://172.17.0.2:9000", aws_access_key_id="minio", aws_secret_access_key="miniokey")
+
+# Print out bucket names
+for bucket in s3.buckets.all():
+    print(bucket.name)