# Install Minio library. # $ pip install minio # # Import Minio library. from minio import Minio # Initialize minioClient with an endpoint and access/secret keys. minioClient = Minio('play.minio.io:9000', access_key='Q3AM3UQ867SPQQA43P2F', secret_key='zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG', secure=True) # Creates a bucket with name mybucket. try: minioClient.make_bucket("mybucket", location="us-east-1") except ResponseError as err: print(err) # Upload an object 'myobject.ogg' with contents from '/home/john/myfilepath.ogg'. try: minioClient.fput_object('mybucket', 'myobject.ogg', '/home/john/myfilepath.ogg') except ResponseError as err: print(err)

相关文章:

  • 2022-03-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2021-09-07
  • 2021-07-30
猜你喜欢
  • 2021-10-14
  • 2022-12-23
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2021-07-04
  • 2021-11-01
相关资源
相似解决方案